{"_id":"@antonlazurko/mylib","_rev":"2-ad7d5b3f2098782eec265ce11a1551e2","name":"@antonlazurko/mylib","dist-tags":{"latest":"1.0.0"},"versions":{"0.1.0":{"version":"0.1.0","license":"MIT","main":"dist/index.js","typings":"dist/index.d.ts","engines":{"node":">=10"},"scripts":{"start":"tsdx watch","build":"tsdx build","test":"tsdx test --passWithNoTests","lint":"tsdx lint","prepare":"tsdx build","size":"size-limit","analyze":"size-limit --why"},"peerDependencies":{"react":">=16"},"husky":{"hooks":{"pre-commit":"tsdx lint"}},"prettier":{"printWidth":80,"semi":true,"singleQuote":true,"trailingComma":"es5"},"name":"@antonlazurko/mylib","author":{"name":"antonlazurko"},"module":"dist/mylib.esm.js","github":"antonlazurko/tsdx-practise#main","size-limit":[{"path":"dist/mylib.cjs.production.min.js","limit":"10 KB"},{"path":"dist/mylib.esm.js","limit":"10 KB"}],"devDependencies":{"@size-limit/preset-small-lib":"^4.11.0","@types/react":"^17.0.9","@types/react-dom":"^17.0.6","husky":"^6.0.0","react":"^17.0.2","react-dom":"^17.0.2","size-limit":"^4.11.0","tsdx":"^0.14.1","tslib":"^2.2.0","typescript":"^4.3.2"},"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":"@antonlazurko/mylib@0.1.0","_nodeVersion":"14.17.0","_npmVersion":"6.14.13","dist":{"integrity":"sha512-uu02HowFq4d5ejiBPJpUN1VTXANuOoQ7dfp/+XJb8bcC/x5XNDigOzb7uW04J198hTr0kXcE3eEdWitWIh/mhw==","shasum":"e20c0e7b66e8e408cb694a6b99256dbcb049d61b","tarball":"https://registry.npmjs.org/@antonlazurko/mylib/-/mylib-0.1.0.tgz","fileCount":14,"unpackedSize":13431,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgv0oeCRA9TVsSAnZWagAA6oAP/3I8YD0x07sB+JBHswP+\nD259poofscUgZdaSECftF8cb7FdKHNqxSuZfAI6ftitIoGpSa7iivBLaH+XE\nQr2HTcCqzYGFdtFBKWs2mQ8kiWA7X7SET6/d0J3k7Fhqqmc64UL5rYS8oGgw\n2b/BiyR/6ULm6tRKk+wsCjJ0w2hhhEbBjaqJ1/VcLoNWr1zKM+N4B6fht3iH\ne8Q43H8jMhHJGP56b7dpJlmuFr/j4XXwvVzio7/mCOlK9d+cM1UNzzV9BcDs\n4E/dT9YUaBG0hAc/0l6ngjMG6b7fFWv8IV4/z+22ylfHh45HtT20wz6uOFQd\nbsH58cdvF1SqFJzs+16ACVNEvNOj38XTMIrGfHL7ANF6qBr+kpXrrF015sVj\ndiGUrj7aj0/19r6UaOBWUh9cUU9rPXvQZCHGExIiYP2UviTR6mg53riS8Cn5\nQtflp4PdhMCyWOx/BQwO2v3us92fCBIViSR/QcDs0sGi7BedxwmeRjLz9L3t\nf7BfqiC4pUb5mMB58OajDSNoQC+dhDKJGNxWt+CieA52JnT05HnRyhL7vWi/\nj5pXFa7owfsvwOKyhj4/fcYZHb++qUAuKL5QAoCr9ahwhWNQfXGpDmAwn8pF\nVRvrWQdhCsaNZrYJalzdjsJqrHWt0rbZWxDEk+X+klfBwy8uAPlCUPYSFDw8\n7kDP\r\n=DSHI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDqtXDXg3PAyiBlCrZAWMTTpyXWhjzr7iLVHjDy66CCkQIgHxraXRI4DJH5Thk4B3x7ms9SeD0Jjfnm72Wgid/KHyU="}]},"_npmUser":{"name":"antonlazurko","email":"a.lazurko.al@gmail.com"},"directories":{},"maintainers":[{"name":"antonlazurko","email":"a.lazurko.al@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mylib_0.1.0_1623149085981_0.7689418116787659"},"_hasShrinkwrap":false},"1.0.0":{"version":"1.0.0","license":"MIT","main":"dist/index.js","typings":"dist/index.d.ts","engines":{"node":">=10"},"scripts":{"start":"tsdx watch","build":"tsdx build","test":"tsdx test --passWithNoTests","lint":"tsdx lint","prepare":"tsdx build","size":"size-limit","analyze":"size-limit --why"},"peerDependencies":{"react":">=16"},"husky":{"hooks":{"pre-commit":"tsdx lint"}},"prettier":{"printWidth":80,"semi":true,"singleQuote":true,"trailingComma":"es5"},"name":"@antonlazurko/mylib","author":{"name":"antonlazurko"},"module":"dist/mylib.esm.js","github":"antonlazurko/tsdx-practise#main","size-limit":[{"path":"dist/mylib.cjs.production.min.js","limit":"10 KB"},{"path":"dist/mylib.esm.js","limit":"10 KB"}],"devDependencies":{"@size-limit/preset-small-lib":"^4.11.0","@types/react":"^17.0.9","@types/react-dom":"^17.0.6","husky":"^6.0.0","react":"^17.0.2","react-dom":"^17.0.2","size-limit":"^4.11.0","tsdx":"^0.14.1","tslib":"^2.2.0","typescript":"^4.3.2"},"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":"@antonlazurko/mylib@1.0.0","_nodeVersion":"14.17.0","_npmVersion":"6.14.13","dist":{"integrity":"sha512-ukYD6wlUHNZ/GaQqwiYGbIlbCyoR8xF3AwGYr2DUSNxTxvHCNYkCAol7uPYSAak8eyA1v04xkzf0ZkmhXiwBDA==","shasum":"b2160836a309bddc6aab2e90d1e56052a197875e","tarball":"https://registry.npmjs.org/@antonlazurko/mylib/-/mylib-1.0.0.tgz","fileCount":15,"unpackedSize":14447,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgwevoCRA9TVsSAnZWagAAB54P/0D24AjK4cpfVPRda7Ih\n7pNZgLdiDgILpcfkAPvunNtUJZT/CtyA7PmimFBYpT2gr/dTbnYvigVLq6cn\nuKzcRc4TJ/QbevUZojFSuZVBxAEBOedNqdzUs9AwnYDS+gkICYYmg1M4ZE1+\nZ91q4FapRpXnI6Z79POBTkqGkegpcE3IBChIHV3YpYcv3ujlZmtdsj5YdaOk\nPx6WM+VbS1igZTZnudtd4zG9xrw+WZt1JYIZx7V8m1+EqkWekfKgpvY131sd\nYRXJr67WgPy9KUddb1OMz0zMDGr7nusI5SbyArulXHuUZyzqXGyHdBHikhkL\nmc5GEZyExA/vDxUk6qDgxUSJeRoCXvLb7+wBUTK9w+DA5f7Ol07dRnmcQ6Q4\n2jWlm8d4t7OtkgX/KudYJvza56bmE5DYCsLg28v1h/Iwjt2WkaPjL4BFTJlt\nami3CbcNYnVCI5CBiPBlWCk8XT2kIxeIXsG1tznLwKSnl2UXAlDgp5nwT5h2\ne8Z4qIwWigwmCVnSgd59hTJ7ZQ2mr64d9x9xNbFj0GKpSyi6b9edNNC/pSfs\nysh2GQM6qpJpIU1/tR/Ejmbefw1wM9WIMuEWQzuP9x0SC7bBzy6GhAYScAIU\n6GkiqYpAxSFr3SKtXg5NsTVKcbEv1a3HbpMSlMGsk2P1QkaISNLu7QCwYiQf\nHSyR\r\n=BfJ1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAksRH85/P3wHIglV/snLG232Oft8z113YLsTL72be8fAiBBZkaSa8kImpb3rIhC+p689vc86y0kwmulapK9RtAwTg=="}]},"_npmUser":{"name":"antonlazurko","email":"a.lazurko.al@gmail.com"},"directories":{},"maintainers":[{"name":"antonlazurko","email":"a.lazurko.al@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mylib_1.0.0_1623321576492_0.6967100561464235"},"_hasShrinkwrap":false}},"time":{"created":"2021-06-08T10:44:45.921Z","0.1.0":"2021-06-08T10:44:46.144Z","modified":"2022-04-04T14:23:26.356Z","1.0.0":"2021-06-10T10:39:36.621Z"},"maintainers":[{"name":"antonlazurko","email":"a.lazurko.al@gmail.com"}],"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.","author":{"name":"antonlazurko"},"license":"MIT","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 component libraries (not apps!) that can be published to NPM. If you’re looking to build a React-based 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```bash\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```bash\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://parceljs.org/module_resolution.html#aliases).\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 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`.\n\n### Bundle analysis\n\nCalculates the real cost of your library using [size-limit](https://github.com/ai/size-limit) with `npm run size` and visulize it with `npm run analyze`.\n\n#### Setup Files\n\nThis is the folder structure we set up for you:\n\n```txt\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](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### GitHub Actions\n\nTwo actions are added by default:\n\n- `main` which installs deps w/ cache, lints, tests, and builds on all pushes against a Node and OS matrix\n- `size` which comments cost comparison of your library on every pull request using [`size-limit`](https://github.com/ai/size-limit)\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## Deploying the Example 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: yarn build && 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 [np](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"}