{"bin":{"ok":"./cli.js"},"dist":{"shasum":"9bba56266d997ca0d4da7d786d4366f9aa1aea06","tarball":"https://registry.npmjs.org/ok-cli/-/ok-cli-2.0.0-10.tgz","fileCount":6,"integrity":"sha512-eQVBUZ1bSquEe6AsoRY8IsTWSYvHZvKZRT8TDgXLbthsoSPMQ5yfn8R6cA7/+8EfKOCuUTB4LoqLDwWTU8N9lg==","signatures":[{"sig":"MEUCICGDdBEEgWIgGlaPTijWkl5ujXA0qkb8p3NbWpY6YIzbAiEAp6NZ9s9rrPturaV2MKBId77WwCmgYDF8GCsebTDn1qg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":6503,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbHwNaCRA9TVsSAnZWagAAnMoP/RmWQoIeqtt3fY0pg5aw\n5UudU5A+WKZN5hftoeARKiAoUba5o/L4dgruYK9YC4k1ig3GdH1uU3jXkqPs\nAhGZ55vGmZatw0KpnxbWCgdDtvZBkFexAWByE02dBkWMC2YYb//xqUfUAb6G\nuLyK/ALwyjl/oP4WJMbttkDYcr76fc6cK34z5QH7tnCBVYFs7q8XQbZu+wBL\nskjkl4asGpsh6MndwrllzhrQN/f9zMaARKgDhpunzJ/y86aUODpnu2YwRw+e\nfTdqK1KOdjH6Srt8yVCw0h0PawvRipmR0NsYUdqXD4YJYSnetgLavmGRTjxK\nb5YLBlRioPnHCCv+2z6Mi+xD+pjELQeHALYgVIsbkRlqUki/8z/8rYqMrpCH\nHnQwcxtfouJE1c6bqx5bGdC96TJlFfDB8SvfBVyF8tVmALekjelHry4mW+ov\nH885X7bcDy9d+Xn+Lh+ETKwpU9pDgHRLFDC86x3Z53u35r2re9cjxYSthPKl\neuWF2gueG3vVt0H2oNbp2TdNjYAaLV3CW8IxV7de8t80zvqW0fJtl4ecfCOL\npxHeUWRElqL2erCrsPOm1t4GfYiK8qOy+JwWU075IHULQXfD9TgS7RewXNTs\nmc89egWwC6trKv2+q9iTYSrl/R8Hd2E4fw5REuYIBTKDpuaLBmhwc/NEiWcG\njt4j\r\n=hq0m\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":"ae29feb40c48870f2a9ab995c60a8647953e8329","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":"8.1.2","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/md":"^1.0.34","@compositor/x0":"^5.0.3","@compositor/log":"^1.0.0-0","update-notifier":"^2.4.0","@compositor/md-loader":"^1.0.34"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{},"_npmOperationalInternal":{"tmp":"tmp/ok-cli_2.0.0-10_1528759129956_0.2999737543705079","host":"s3://npm-registry-packages"},"_id":"ok-cli@2.0.0-10","version":"2.0.0-10"}