{"_id":"22x-package","_rev":"2-04d159f936632867da7fbb161fe82b73","name":"22x-package","dist-tags":{"latest":"1.0.3"},"versions":{"1.0.2":{"name":"22x-package","version":"1.0.2","keywords":["vite","typescript","library"],"author":{"name":"22x"},"_id":"22x-package@1.0.2","maintainers":[{"name":"22x","email":"1517825983@qq.com"}],"dist":{"shasum":"80341af015c62fde2ed4c2c00d953cb8d49ef742","tarball":"https://registry.npmjs.org/22x-package/-/22x-package-1.0.2.tgz","fileCount":2,"integrity":"sha512-rLfljvbg6GjUzuN6F/i8OtYPAiDfdc1BkQnhWSWv+S4XSE/xDwsUNYVUIyxB4Tr+M2L7y233VMrW66HXnaaTAw==","signatures":[{"sig":"MEQCICGKES/OIoSMyzOvL1H7U878zURLavY4OtvVAH8YG4DRAiAgz88p99owhDfcpnhU+w2uBagiVv9mv6qH8QoMfNLtnw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":4872},"main":"./dist/index.cjs","type":"module","module":"./dist/index.js","gitHead":"5d58cb6cf58517920d414a6c3aff23d8329b3193","private":false,"scripts":{"dev":"vite","lint":"eslint src/","test":"vitest run","build":"vite build","test:ui":"vitest --ui --coverage","test:watch":"vitest","test:coverage":"vitest run --coverage"},"typings":"./dist/index.d.ts","_npmUser":{"name":"22x","email":"1517825983@qq.com"},"_npmVersion":"8.19.2","description":"A minimalist template for building a library with Vite and TypeScript","directories":{},"_nodeVersion":"16.18.0","_hasShrinkwrap":false,"devDependencies":{"vite":"^5.4.8","eslint":"^9.12.0","vitest":"^1.6.0","globals":"^15.11.0","@eslint/js":"^9.12.0","@vitest/ui":"^1.6.0","typescript":"^5.6.3","@types/node":"^20.16.11","vite-plugin-dts":"^3.9.1","typescript-eslint":"^8.8.1","@vitest/coverage-v8":"^1.6.0","@typescript-eslint/parser":"^8.8.1","@typescript-eslint/eslint-plugin":"^8.8.1","eslint-plugin-simple-import-sort":"^12.1.1"},"_npmOperationalInternal":{"tmp":"tmp/22x-package_1.0.2_1748228630941_0.9618701387940685","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"22x-package","description":"A minimalist template for building a library with Vite and TypeScript","author":{"name":"22x"},"keywords":["vite","typescript","library"],"private":false,"version":"1.0.3","type":"module","main":"./dist/index.cjs","module":"./dist/index.js","typings":"./dist/index.d.ts","scripts":{"dev":"vite","build":"vite build","lint":"eslint src/","test":"vitest run","test:watch":"vitest","test:ui":"vitest --ui --coverage","test:coverage":"vitest run --coverage"},"devDependencies":{"@eslint/js":"^9.12.0","@types/node":"^20.16.11","@typescript-eslint/eslint-plugin":"^8.8.1","@typescript-eslint/parser":"^8.8.1","@vitest/coverage-v8":"^1.6.0","@vitest/ui":"^1.6.1","eslint":"^9.12.0","eslint-plugin-simple-import-sort":"^12.1.1","globals":"^15.11.0","typescript":"^5.6.3","typescript-eslint":"^8.8.1","vite":"^5.4.8","vite-plugin-dts":"^3.9.1","vitest":"^1.6.0"},"gitHead":"5d58cb6cf58517920d414a6c3aff23d8329b3193","_id":"22x-package@1.0.3","_nodeVersion":"16.18.0","_npmVersion":"8.19.2","dist":{"integrity":"sha512-ghsl8a35Z5Drdbla/WNwsMA4mgaDPxS/8iIu+vd2yX34nz1wl/8LVnQwEvkHZxBc7PvYjJ+4cv5BdnzfmtRlNA==","shasum":"2f8cb4cf5b10773183320b8ec2c0e1cefb19991b","tarball":"https://registry.npmjs.org/22x-package/-/22x-package-1.0.3.tgz","fileCount":2,"unpackedSize":4872,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCvEzHhuCg+1khY/ATdG+QmvCBIgdZnMdWZ8IWg/co6agIgLL6+CUfH2gC3763FiG/DTHRkArQslen67yZzNKCn+ts="}]},"_npmUser":{"name":"22x","email":"1517825983@qq.com"},"directories":{},"maintainers":[{"name":"22x","email":"1517825983@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/22x-package_1.0.3_1748250183877_0.15005582118718674"},"_hasShrinkwrap":false}},"time":{"created":"2025-05-26T03:03:50.940Z","modified":"2025-05-26T09:03:04.223Z","1.0.2":"2025-05-26T03:03:51.130Z","1.0.3":"2025-05-26T09:03:04.054Z"},"author":{"name":"22x"},"keywords":["vite","typescript","library"],"description":"A minimalist template for building a library with Vite and TypeScript","maintainers":[{"name":"22x","email":"1517825983@qq.com"}],"readme":"# vite-vanilla-ts-template\r\n\r\n<p align=\"center\">\r\n    <img alt=\"license\" src=\"https://img.shields.io/github/license/entwurfhaus/vite-vanilla-ts-module?style=flat-square\" />\r\n    <img alt=\"release\" src=\"https://img.shields.io/github/v/tag/entwurfhaus/vite-vanilla-ts-template?label=release&style=flat-square\" />\r\n    <img alt=\"stargazers\" src=\"https://img.shields.io/github/stars/entwurfhaus/vite-vanilla-ts-template?style=flat-square\" />\r\n</p>\r\n\r\n> Check out the older version of this template, https://github.com/entwurfhaus/vite-vanilla-ts-module.\r\n> And always check the `package.json` dependencies - this template scaffolded from Vite 5.x, and compatible with Node 18.x & beyond\r\n\r\nThis is a minimalist Vite `vanilla-ts` template, for developing `ts` supported modules for publishing onto `npm`.\r\n\r\n```bash\r\nnpx degit entwurfhaus/vite-vanilla-ts-template my-awesome-package\r\n```\r\n\r\n## Getting started\r\n\r\nFirst, let's install all dependencies:\r\n\r\n```bash\r\npnpm i\r\n```\r\n\r\nWhen you're ready to build and use your new `npm` package, run:\r\n\r\n```bash\r\npnpm build\r\n```\r\n\r\n### Why `pnpm` and not `npm` or `yarn`?\r\n\r\nThis minimalist template is meant to be easily migrated to monorepo frameworks, such as `turbo` (Turborepo) and `nx` (Nx). Thus, it is why files like `tsconfig.json` have a simple configuration.\r\n\r\nAnd pnpm offers several benefits:\r\n\r\n1. Efficient disk space usage through a content-addressable store\r\n2. Faster installation times compared to npm and yarn\r\n3. Strict dependency resolution, preventing phantom dependencies\r\n4. Built-in monorepo support with workspaces\r\n5. Compatibility with npm and yarn workflows\r\n6. Improved security with a stricter package management approach\r\n\r\n### What is configured in this template?\r\n\r\n- Generate declaration Typescript file: `vite-plugin-dts`: A useful Vite plugin that automatically generates and produces the `index.d.ts` file in the `dist` folder.\r\n- Linting: `eslint`: Standard configuration included, together with `eslint-plugin-simple-import-sort` for organizing imports (a must-have for code organization).\r\n- Code coverage: Using `istanbul` integration with `vitest` by default. This is optional and can be reconfigured to use `coverage-c8` (or its future renamed version) if preferred.\r\n\r\n> And you can configure & add-on anything you like, to suit your development whether if it is the standalone module repo, or module within a monorepo.\r\n\r\n## Github actions (optional)\r\n\r\nI've added Github actions in this template - delete the `.github` folder if you're not using Github actions in your devops pipeline.\r\n\r\n## Testing\r\n\r\n### Unit testing with `vitest`\r\n\r\nRun `vitest` (without \"watch\" mode):\r\n\r\n```bash\r\npnpm test\r\n```\r\n\r\nOr run `vitest` with code coverage report:\r\n\r\n```bash\r\npnpm test:coverage\r\n```\r\n\r\n### Local testing only\r\n\r\nRun below command in your new `npm` package repository. For example, `cd /var/www/my-awesome-package` then run:\r\n\r\n```bash\r\npnpm link --global\r\n```\r\n\r\nLastly, go to your desired application that will use your new `npm` package and run:\r\n\r\n```bash\r\npnpm link /var/www/my-awesome-package\r\n```\r\n\r\n## Publishing\r\n\r\n### NPM\r\n\r\nAnd when ready to publish to `npm`:\r\n\r\n```bash\r\nnpm login\r\nnpm publish\r\n```\r\n\r\n## References\r\n\r\nThe list of online references & to credit the open-source community, for making mini projects like these possible, **helping developers save many minutes** working.\r\n\r\n1. Peter Mekhaeil | How to build an npx starter template - https://github.com/petermekhaeil/create-my-template\r\n2. Netlify | Creating a TypeScript Package with Vite - https://onderonur.netlify.app/blog/creating-a-typescript-library-with-vite/\r\n3. Jason Stuges | Github - https://github.com/jasonsturges/vite-typescript-npm-package\r\n","readmeFilename":"README.md"}