{"bin":{"ok":"./cli.js"},"dist":{"shasum":"deff9a7a35e8758ad94ac1e8dc77cc472441650b","tarball":"https://registry.npmjs.org/ok-cli/-/ok-cli-2.0.0-16.tgz","fileCount":5,"integrity":"sha512-j2/zbRcPgTHRFlXqkNC4ZheEhnHRAMZA8ZFjqn585egGI+ihNzybj9Obt0nxtZ8/wQQLu9OB24xtuV4NkpWfiQ==","signatures":[{"sig":"MEYCIQCtD3wDjGIcM8wxSwB4BRMrxhsdlrJp1jTrfLb47zOQLgIhAJIJPK4/HEK4pW4vx4AjMaNE/WOifR1gwXhCn3CCyE2R","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7814,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbHw7RCRA9TVsSAnZWagAAyMoP/Rc/N8Mvwi+3s1M4Fk2d\n5ct349yRP9M7dSgQHAs1phxclUR8jN4cLRs9HZnmCQ0OzIQL2SBCDWhE/2Uc\npgNb3nbr0i6iUvGavKccsOg0nmBAgUiaUwljVri7+ZvC7bjr00bDC7EAkRu5\nkbEKRnb4Re3k8+tYEyoDyPVSG66bbv9gqnLdsTga5Iansw1vcukAiIWAd8xD\nbCnIFJndxw4wWXvS1kzSb6VXs8KhYjjMfLaHfol08MsGwbl8ub4qCFFEJZf3\nNmU6pEwxu4GdbR7vQGUAB7qTEScXhlKULcC36Bu5oNCpjSzs9oYy73mad1Ac\nAz4wLipgnTEmJlcFbBGV9DvRB+xs4YOdfbO1CtBvrbmhvnhup3dYdncD+U/p\nyEZtoDRr41s+xl0OA8FanaP1ufpLDFMaDUTV9IO4WZO6xd7jMuCnL7d/VnLP\nS+KQbu2rPKvZ7mhIeC4loZxnc8k7phRYuiDlaHnlsDgNNG5Er2RKZQI6XQt5\nJUDHIe7C1Kf4/pJfzJfKg2WnjvlHQuMmDj63aCARa1NSGXJIp1yv3suDQbv7\ndgZx6MOItCxWhilqICl3tysm5L+YWdG2tc7neKl5zGNUGwkN2zH2k8kSbtTI\nUWuJw0opew3W8kWDolr+t7YEHkw97MIXlKaqHLz4gN85Ox0SElf4NZVLuqIk\n68rU\r\n=xVGf\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":"c67fc966172a1db8846e81e25b346d20b123e429","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":{"rebass":"^2.0.0-5","refunk":"^3.0.1"},"_npmOperationalInternal":{"tmp":"tmp/ok-cli_2.0.0-16_1528762065450_0.9455768462930241","host":"s3://npm-registry-packages"},"_id":"ok-cli@2.0.0-16","version":"2.0.0-16"}