{"bin":{"ok":"./cli.js"},"dist":{"shasum":"1456a0e2a9815264950b9ddc78d387cd47f9088c","tarball":"https://registry.npmjs.org/ok-cli/-/ok-cli-2.0.0-12.tgz","fileCount":5,"integrity":"sha512-68/noeq7xt0h2bQAjOIgO6kDM8Dmz0I2uU95KXTL6L5DRQaQelz8CcjzkDf906j8EiqIa21nSmN267anJRS1+w==","signatures":[{"sig":"MEUCIQD4s8VkWsJ64vLgZZ2qBVJBtluIYmsnzYokbGx0HlU2+QIgFj7x914ToFm+cHgNt3dU39REOBl+Uz66x8MggCPYv4o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7490,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbHwnBCRA9TVsSAnZWagAAzqcP/iNUI/0lTYXbloIeCV6g\nYZ59iak889es7AIUSGRTd/q+0pRsVetcC7azJNJqryq0rAA5LlaazOQ3vE8m\npl1u0K5eluEtC0UqhTH9WAwKmI2a+2T5/HZ4haaCxdU3EyQsQp/2EYfXlbwP\n/RizY3zjjV4jhlnVlnMiMYjOidvECY+BWNvYUTiGWhCrdNfZolcxTH4ax9R2\n6CQznqjgAf9+jZ8uS2UJ0GKoVgEQ/d5bmdlSeWdQKB3CDAMgCeNO+hCQ8LiE\nuTg9riTm5YA/rOcOHlcf6koI4JX/uveooANICIv9VI0wrluaA/lYytkVaW+1\nUGQXnmG8824/yzXKZdeimPhalK6jK1+m6kLYpyxJlNKSAtCSpZQ5ALMnACyR\nq9pqQiNsGvg+YzUlZvo1KfZlpVOCrd42nSvBQE2ZDBcZkOMpWEmuUQ6j8MVA\nIJt0mhG1suEjBZz3Y+YR7bM35f85+oU1LcLNhum4t+4Xk8c3MCFhcN/LpTEa\nSKVeTKuVnf5dhswoWFZMCVeaOa9bxbO+HjOb9wHJck7RB/efoN6vNcdz4dxc\np/HWzJtiz6akhvZmh/DQ+Gy5cEn/f2kQnvxCowfvA6lZLffvOdBabfaOmBRG\nkV3IQnUX0PEpFCUDofa6OMBH3Xxlmkwg6R6nAI5dovRoDnEaOF+IPv4D/FM7\ndAt5\r\n=Kr3y\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":"6aa9fad49b89298780de5c02c0913b5fcfa42c2b","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-12_1528760769386_0.21926006441187518","host":"s3://npm-registry-packages"},"_id":"ok-cli@2.0.0-12","version":"2.0.0-12"}