{"name":"docz-components","version":"2.0.0-rc.3","main":"dist/index.js","module":"dist/docz-components.esm.js","typings":"dist/index.d.ts","scripts":{"start":"tsdx watch","build":"tsdx build","test":"tsdx test --env=jsdom","lint":"tsdx lint"},"peerDependencies":{"react":">=16"},"husky":{"hooks":{"pre-commit":"pretty-quick --staged"}},"prettier":{"printWidth":80,"semi":true,"singleQuote":true,"trailingComma":"es5"},"devDependencies":{"@types/jest":"^24.0.18","@types/react":"^16.9.2","@types/react-dom":"^16.9.0","@types/theme-ui":"^0.2.2","husky":"^3.0.4","prettier":"^1.18.2","pretty-quick":"^1.11.1","react":"^16.9.0","react-dom":"^16.9.0","tsdx":"^0.9.0","tslib":"^1.10.0","typescript":"^3.6.2"},"dependencies":{"@emotion/core":"^10.0.16","@mdx-js/react":"^1.4.0","copy-text-to-clipboard":"^2.1.0","lodash":"^4.17.15","lodash-es":"^4.17.15","re-resizable":"^6.0.0","react-feather":"^2.0.3","react-live":"^2.2.0","theme-ui":"^0.2.38"},"readme":"# TSDX React User Guide\n\nCongrats! You just saved yourself hours of work by bootstrapping this project with TSDX. Let’s get you oriented with what’s here and how to use it.\n\n> This TSDX setup is meant for developing React components (not apps!) that can be published to NPM. If you’re looking to build an app, you should use `create-react-app`, `razzle`, `nextjs`, `gatsby`, or `react-static`.\n\n> If you’re new to TypeScript and React, checkout [this handy cheatsheet](https://github.com/sw-yx/react-typescript-cheatsheet/)\n\n## Commands\n\nTSDX scaffolds your new library inside `/src`, and also sets up a [Parcel-based](https://parceljs.org) playground for it inside `/example`.\n\nThe recommended workflow is to run TSDX in one terminal:\n\n```\nnpm start # or yarn start\n```\n\nThis builds to `/dist` and runs the project in watch mode so any edits you save inside `src` causes a rebuild to `/dist`.\n\nThen run the example inside another:\n\n```\ncd example\nnpm i # or yarn to install dependencies\nnpm start # or yarn start\n```\n\nThe default example imports and live reloads whatever is in `/dist`, so if you are seeing an out of date component, make sure TSDX is running in watch mode like we recommend above. **No symlinking required**, [we use Parcel's aliasing](https://github.com/palmerhq/tsdx/pull/88/files).\n\nTo do a one-off build, use `npm run build` or `yarn build`.\n\nTo run tests, use `npm test` or `yarn test`.\n\n## Configuration\n\nCode quality is [set up for you](https://github.com/palmerhq/tsdx/pull/45/files) with `prettier`, `husky`, and `lint-staged`. Adjust the respective fields in `package.json` accordingly.\n\n### Jest\n\nJest tests are set up to run with `npm test` or `yarn test`. This runs the test watcher (Jest) in an interactive mode. By default, runs tests related to files changed since the last commit.\n\n#### Setup Files\n\nThis is the folder structure we set up for you:\n\n```\n/example\n  index.html\n  index.tsx       # test your component here in a demo app\n  package.json\n  tsconfig.json\n/src\n  index.tsx       # EDIT THIS\n/test\n  blah.test.tsx   # EDIT THIS\n.gitignore\npackage.json\nREADME.md         # EDIT THIS\ntsconfig.json\n```\n\n#### React Testing Library\n\nWe do not set up `react-testing-library` for you yet, we welcome contributions and documentation on this.\n\n### Rollup\n\nTSDX uses [Rollup v1.x](https://rollupjs.org) as a bundler and generates multiple rollup configs for various module formats and build settings. See [Optimizations](#optimizations) for details.\n\n### TypeScript\n\n`tsconfig.json` is set up to interpret `dom` and `esnext` types, as well as `react` for `jsx`. Adjust according to your needs.\n\n## Continuous Integration\n\n### Travis\n\n_to be completed_\n\n### Circle\n\n_to be completed_\n\n## Optimizations\n\nPlease see the main `tsdx` [optimizations docs](https://github.com/palmerhq/tsdx#optimizations). In particular, know that you can take advantage of development-only optimizations:\n\n```js\n// ./types/index.d.ts\ndeclare var __DEV__: boolean;\n\n// inside your code...\nif (__DEV__) {\n  console.log('foo');\n}\n```\n\nYou can also choose to install and use [invariant](https://github.com/palmerhq/tsdx#invariant) and [warning](https://github.com/palmerhq/tsdx#warning) functions.\n\n## Module Formats\n\nCJS, ESModules, and UMD module formats are supported.\n\nThe appropriate paths are configured in `package.json` and `dist/index.js` accordingly. Please report if any issues are found.\n\n## Using the Playground\n\n```\ncd example\nnpm i # or yarn to install dependencies\nnpm start # or yarn start\n```\n\nThe default example imports and live reloads whatever is in `/dist`, so if you are seeing an out of date component, make sure TSDX is running in watch mode like we recommend above. **No symlinking required**!\n\n## Deploying the Playground\n\nThe Playground is just a simple [Parcel](https://parceljs.org) app, you can deploy it anywhere you would normally deploy that. Here are some guidelines for **manually** deploying with the Netlify CLI (`npm i -g netlify-cli`):\n\n```bash\ncd example # if not already in the example folder\nnpm run build # builds to dist\nnetlify deploy # deploy the dist folder\n```\n\nAlternatively, if you already have a git repo connected, you can set up continuous deployment with Netlify:\n\n```bash\nnetlify init\n# build command: cd example && yarn && yarn build\n# directory to deploy: example/dist\n# pick yes for netlify.toml\n```\n\n## Named Exports\n\nPer Palmer Group guidelines, [always use named exports.](https://github.com/palmerhq/typescript#exports) Code split inside your React app instead of your React library.\n\n## Including Styles\n\nThere are many ways to ship styles, including with CSS-in-JS. TSDX has no opinion on this, configure how you like.\n\nFor vanilla CSS, you can include it at the root directory and add it to the `files` section in your `package.json`, so that it can be imported separately by your users and run through their bundler's loader.\n\n## Publishing to NPM\n\nWe recommend using https://github.com/sindresorhus/np.\n\n## Usage with Lerna\n\nWhen creating a new package with TSDX within a project set up with Lerna, you might encounter a `Cannot resolve dependency` error when trying to run the `example` project. To fix that you will need to make changes to the `package.json` file _inside the `example` directory_.\n\nThe problem is that due to the nature of how dependencies are installed in Lerna projects, the aliases in the example project's `package.json` might not point to the right place, as those dependencies might have been installed in the root of your Lerna project.\n\nChange the `alias` to point to where those packages are actually installed. This depends on the directory structure of your Lerna project, so the actual path might be different from the diff below.\n\n```diff\n   \"alias\": {\n-    \"react\": \"../node_modules/react\",\n-    \"react-dom\": \"../node_modules/react-dom\"\n+    \"react\": \"../../../node_modules/react\",\n+    \"react-dom\": \"../../../node_modules/react-dom\"\n   },\n```\n\nAn alternative to fixing this problem would be to remove aliases altogether and define the dependencies referenced as aliases as dev dependencies instead. [However, that might cause other problems.](https://github.com/palmerhq/tsdx/issues/64)\n","readmeFilename":"README.md","description":"Congrats! You just saved yourself hours of work by bootstrapping this project with TSDX. Let’s get you oriented with what’s here and how to use it.","_id":"docz-components@2.0.0-rc.3","_nodeVersion":"10.16.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-jYwtj1XXY4ETd4+XVcUi1H0y/enXZLs8q+rbG8AXDThuK8qZHiiHep93+31HFe/RdWpBnApeiuHUPyKBWd5xbw==","shasum":"8481c7d00916e7353b57907914f816c657986d09","tarball":"http://registry-npm.ywwl.com/docz-components/download/docz-components-2.0.0-rc.3.tgz","fileCount":17,"unpackedSize":53662,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdaphKCRA9TVsSAnZWagAAgbAP/02Cq0PyLUb6PWLSBT+1\naI+cmKoT5QooknA4EnzIROCg+WWuj7zbQUHz9NGCf7JpOOfci1e0NOEWocmF\nzFapS6UEG1+CIJ+yLLsXgiKUUuN8BDrmlpPwR6PjnUhzoHxn0QEZ8ltCWg7l\nGw65zH2ORqdExAgeGliu9kRY7znqUsfHVa+BpGDwZGPKWIA046oHCZ6o31um\n3yrPTtxb4wY3EHFj57rNe8/iWC7nIxZqxl82S833RwnxzncTqz4klh0eO2Cp\nkXVk0QZcVz6JhIsi6PNQhw91Xx5r4kqS3B/Q+zk0jFmv6qksYK4qswxJdntr\n9f4mWl3EpqVhiAVwvsHA+sNV3ZZtSorzzMZqk/JskJNL0oYB4ejCv67jL/R/\nUwkMo0vIlIYmCXoblrLy1uWe9I3lB3NqskSmGIbG1kXtYLiFI/oAlQGDrq14\nI+5GOS4NRcf+vEBSx9QMTzUW9lPyX2Xfct1TWiC53OU9Y1i8HUEvHS6HjZdN\nb256XvWO9n20Jr8WimMGiFLsS5Dng1QYtsu/sye/EiXU+BRwq1N7LdQ1KxLR\nZ+jJTH8osiPjxOHAfxARCLGm+Zv4wooo2JGk5BJKO4HAPr5TGtgvyuSX/n0Y\nkJpJ2E4BG1NOFabpGYvkVGj6jvEXX61G4QqXcWCfAO9hKcu8XndlPtRDzsKs\nwSbP\r\n=pbFt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD0GZRvm05wBb9Wmshk+sOsEcVxeK4CeSheX/iuBFnJkwIgUW3zer17V5Lbd6uiWEonv4Bw4m0VPblza1AXBHEkKNY="}],"size":12073,"noattachment":false,"key":"/docz-components/-/docz-components-2.0.0-rc.3.tgz"},"maintainers":[{"name":"rakannimer","email":"rakannimer@gmail.com"}],"_npmUser":{"name":"rakannimer","email":"rakannimer@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/docz-components_2.0.0-rc.3_1567266887874_0.14681247485323734"},"_hasShrinkwrap":false,"publish_time":1567266888019,"_cnpm_publish_time":1567266888019,"dist-tags":{"alpha":"2.0.0-rc.23","latest":"2.0.0-rc.5","next":"2.0.0-rc.63"}}