{"bin":{"ok":"./cli.js"},"dist":{"shasum":"33030d92e4636ee77fc2304663f3b4e0db2bc73c","tarball":"https://registry.npmjs.org/ok-cli/-/ok-cli-2.0.0-0.tgz","fileCount":5,"integrity":"sha512-5OK0qEaSL7a0i/GnutnrE60rFecr12DEC2lOBIjANk1wMaQo/phvaruXBN9sDP4Vj5vvCw+Fy3ldII8mtTkEqA==","signatures":[{"sig":"MEQCIHfwT21PgToTXDe2muB1v31j2PVkBvvjCCS5C/IZ0qj3AiBetCn15M90am3m+AEBMEQwCT1dcZeKmB8Yf6Q//2mSZA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5710,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbEVAdCRA9TVsSAnZWagAAkVwP/2nQRHROjcmHWtn7ql09\nPRqWNNwsQ53q9FhmSjy/6UL7UMP3K5eycS9fEb51xLPH9yBGMfUXzK96V9J+\nK3deMR4j4ncGC9WC3Z1b4d1uR8e+8kmAxo8JeRKybHqF1Z/FuGPTFZyxBPha\nDZhb1Tz2/d8dhzwQkruJtSsKKzmoSF7pE5KqYWSGC+TLmBnCw1M5Kxu/Xu59\nK7nTIIYoraGDtMulGNJFjysTAuGFuzzyn3eDgDzCdfe91oTv6YLtW8VSdmYJ\nXJEhGu2twaMA25Vjq5RrbW2ZkRhlD5+yhaM5JIvRquIADoQVCUdG5j3FoRDU\naV4TpIk8NQ5ELe8KHRcFN5SGmyGNBAln3Os1UJA0i1WL61yMoTHLU+AOMOJX\n6+Z7QDT0uqgDAqP4ZCu5zaY9oU561C4T4c441foU1+tMg0QJOgJMtxRkpl6M\nvwt+i/Eh1Rur+IZ/onBTE9l+lTcSUMrkHZz+8z3dCULMn18cBjigznPqoKY3\nh7lb4shXv4DKXMA8FwPlbfwYqvQHCMPVZYVPJ+96/q8q0UVNm5RApZUj3GVV\nttpjph+fNlfWsuvbCM/nBml+Ka9QFCnyuKxYaoaky1UcA1hUk65Gcx4FNueP\nrA3xPjeUTD82rlSoCjwjuq/jUq9quvEJUnIbDDOPr8H+W8KkOQUQY4dyiMJk\nd+iP\r\n=COab\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","name":"ok-cli","author":{"name":"Brent Jackson"},"readme":"\n# ok-cli\n\nZero-config development environment for React, MDX, and JSX\n\n\n```sh\nnpm i -D ok-cli\n```\n\nAdd run scripts to your `package.json`\n\n**Single component**\n\n```json\n\"scripts\": {\n  \"start\": \"ok App.js\",\n  \"build\": \"ok App.js -d dist\"\n}\n```\n\n**Directory of components**\n\n```json\n\"scripts\": {\n  \"start\": \"ok components\",\n  \"build\": \"ok components -d dist\"\n}\n```\n\n**MDX file**\n\n```json\n\"scripts\": {\n  \"start\": \"ok hello.mdx\",\n  \"build\": \"ok hello.mdx -d dist\"\n}\n```\n\n**JSX file**\n\n```json\n\"scripts\": {\n  \"start\": \"ok hello.jsx\",\n  \"build\": \"ok hello.jsx -d dist\"\n}\n```\n\n## Usage\n\n**Development server**\n\n```sh\nok hello.mdx\n```\n\n**Static build**\n\n```sh\nok hello.mdx --out-dir dist\n```\n\n**HTML only build**\n\n```sh\nok hello.mdx --out-dir dist --static\n```\n\n### Options\n\n- `-p --port`: port number for development server\n- `-o --open`: automatically open development server in default browser\n- `-c --config`: path to [config file](#configuration) (default `ok.config.js`)\n- `-d --out-dir`: builds page to the given directory\n- `-s --static`: renders HTML-only (without client-side bundle.js)\n\n### MDX Format\n\n[MDX][mdx] files combine markdown syntax with JSX.\nEach .mdx file can use [front-matter][fm] to define default props and metadata used for static page generation.\n\n**Example .mdx file**\n```mdx\n---\ntitle: Hello MDX\n---\n\n# Hello Markdown\n\n<div>\n  <h2>{props.title}</h2>\n</div>\n```\n\n### JSX Format\n\nJSX files are rendered as pure React components, which allows for rapid prototyping without the need to setup a full React application.\nJSX files also use [front-matter][fm] to define default props and metadata.\n\n**Example .jsx file**\n\n```jsx\n---\ntitle: Hello JSX\n---\n<div>\n  <h2>{props.title}</h2>\n</div>\n```\n\n## Configuration\n\nA configuration file can be provided to add components and theme to scope.\n\n```js\n// example ok.config.js file\nimport * as Rebass from 'rebass'\n\nconst components = Rebass\n\nconst theme = {\n  colors: {\n    blue: '#07c',\n    green: '#0f8'\n  }\n}\n\nexport default {\n  components,\n  theme\n}\n```\n\nBy default, ok looks for an `ok.config.js` file. To point to a custom configuration file, use the `--config` flag.\n\n`ok hello.mdx --config my-config.js`\n\nWhen a configuration file provides components in scope, they can be used in .mdx or .jsx files.\n\n**Example .jsx file**\n```jsx\n---\ntitle: Hello JSX\n---\n<Box px={3} py={4} bg='blue' color='white'>\n  <Heading>\n    {props.title}\n  </Heading>\n</Box>\n```\n\n### Provider\n\nThe root level component can be customized by passing the component as the `Provider` option in the config file.\n\n```js\n// example ok.config.js\nimport React from 'react'\nimport * as Rebass from 'rebass'\n\nconst components = Rebass\n\nconst provider = props => (\n  <Rebass.Box px={3} py={4}>\n    {props.children}\n  </Rebass.Box>\n)\n\nexport default {\n  components,\n  provider\n}\n```\n\n## Webpack Configuration\n\nA custom `webpack.config.js` file can be used to add custom webpack features.\nThe config file can export either a webpack configuration object or function that returns a config object.\nBy default, ok will look for a file named `webpack.config.js`.\nTo pass a custom file, use the `--webpack` flag.\n\n---\n\nMIT License\n\n[mdx]: https://github.com/mdx-js/specification\n[fm]: https://jekyllrb.com/docs/frontmatter/\n","gitHead":"5d84b99b7f4615cb6adae33e31c9234e18128519","license":"MIT","scripts":{"build":"./cli.js docs -d dist","start":"./cli.js docs -o","build-jsx":"./cli.js docs/beep.jsx -d dist","start-jsx":"./cli.js docs/beep.jsx -o","start-mdx":"./cli.js docs/hello.mdx -o","static-jsx":"./cli.js docs/beep.jsx -d dist -s"},"_npmUser":{"name":"jxnblk","email":"jxnblk@gmail.com"},"keywords":[],"_npmVersion":"6.1.0","description":"Zero-config development environment for React, MDX, and JSX","directories":{},"maintainers":[{"name":"jxnblk","email":"jxnblk@gmail.com"}],"_nodeVersion":"10.3.0","dependencies":{"meow":"^4.0.0","chalk":"^2.3.2","find-up":"^2.1.0","pkg-conf":"^2.1.0","read-pkg-up":"^3.0.0","@compositor/x0":"^5.0.3","@compositor/log":"^1.0.0-0","update-notifier":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{},"_npmOperationalInternal":{"tmp":"tmp/ok-cli_2.0.0-0_1527861277367_0.2844832920950202","host":"s3://npm-registry-packages"},"_id":"ok-cli@2.0.0-0","version":"2.0.0-0"}