{"bin":{"ok":"./cli.js"},"dist":{"shasum":"ce6918c49c89f598abd7b059f35495e1e06844d4","tarball":"https://registry.npmjs.org/ok-cli/-/ok-cli-2.0.0-17.tgz","fileCount":6,"integrity":"sha512-zQiYGtXp0sCcB5zI69z/Hu73KxFwW3dj6diV/h2iNxjrpetSdJAKCHLsJydyRGkVLYdbva2nDvJ0B1pxhhVm7w==","signatures":[{"sig":"MEYCIQCr2zrAqKJJwbisaf4oV9Td86BhmB47JUUH86L8fuiDaQIhALmDMCXw7+ZW0iRovBI8MtKZxoPtp5ROwNaPMGqHQwqO","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":9215,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbHxM9CRA9TVsSAnZWagAAIJkP/RiNAREB5PmYD0gtpMbI\nyvafRqyUIlJ3nw7k7EiiaaIMfiibLDrKaA/J2wASnRhbOyUlUhFDTc0rfiLh\n58T5ceIZEUgj4jhndDf5Plk3prQDc5c5clXjt21dPIezSGQZtdJh3avaP2QW\nprmbr7g4y6HKWGAKMO4asNuhepOvrBZe7NIVFaWsxAlPcfJjh2C7Gb8LgZ9S\nBnoXElLKJsS5tm2F8eob4izmh2nzlbTusFCP7sKqOzZ2jn+b1YrUGiiSRRHT\n5inpBoE2zgaGFgznUHuKrW1i5jwm1fDd57ogfbnRW5/UB7nAVOzIaS9qTtjO\nYjGvEymQ4ycRfnKddNUSjnI6T5vs0t+I5aCK3lUNQ8Q7SPT23/OPdE/Fv2tQ\n5tQufvghhne4WNtttNQ7mbE81fbOwuY2diTfhYI+pIhSuvxTsOLwkyAk2UdB\nIldpe4Z158CgK53nKLVRdQcUFMzoOzQq16SV+5KpAneO2I8swQN+YxXWCnAf\nfVZ/KlDMUvDEOZi8xLev3AiD2KDsePBtvpFdVe9fJ/n7m6IaiH60fEj/Pus7\nJOervmjhtaD+GoYu42c3ZPY9Fu1yCvK7Tth7yWqjq7EJc3I2cgb0YCuFqVSC\nT0YorG1jAcPhilJwisOFhJbAHk4oYYvxys9OtfMY3koyPDq1aT463F5IO3Ka\n/q//\r\n=UhX6\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":"951e02618e85962bf0867f21b69240ec484918f1","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","react":"^16.4.0","find-up":"^2.1.0","pkg-conf":"^2.1.0","react-dom":"^16.4.0","read-pkg-up":"^3.0.0","@compositor/md":"^1.0.34","@compositor/x0":"^5.0.6-0","@compositor/log":"^1.0.0-0","update-notifier":"^2.4.0","react-router-dom":"^4.3.1","@compositor/md-loader":"^1.0.34"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"rebass":"^2.0.0-5","refunk":"^3.0.1"},"_npmOperationalInternal":{"tmp":"tmp/ok-cli_2.0.0-17_1528763197198_0.861116560712673","host":"s3://npm-registry-packages"},"_id":"ok-cli@2.0.0-17","version":"2.0.0-17"}