@chronicstone/vue-testid
The starter is built on top of Vite 4.x and prepared for writing libraries in TypeScript. It generates a hybrid package - both support for CommonJS and ESM modules.
1,979
| Install | |
|---|---|
npm install @chronicstone/vue-testid |
|
| Latest Version: | 0.1.1 |
| Vue: | 3 |
| Last Updated: | Mar 30, 2024 |
| Links: | npm |
Maintainer: chronicstone
vite-vanilla-ts-lib-starter
The starter is built on top of Vite 4.x and prepared for writing libraries in TypeScript. It generates a hybrid package - both support for CommonJS and ESM modules.
Features
- Hybrid support - CommonJS and ESM modules
- IIFE bundle for direct browser support without bundler
- Typings bundle
- ESLint - scripts linter
- Stylelint - styles linter
- Prettier - formatter
- Vitest - test framework
- Husky + lint-staged - pre-commit git hook set up for formatting
GitHub Template
This is a template repo. Click the green Use this template button to get started.
Clone to local
If you prefer to do it manually with the cleaner git history
git clone https://github.com/kbysiec/vite-vanilla-ts-lib-starter.git
cd vite-vanilla-ts-lib-starter
npm i
Checklist
When you use this template, update the following:
- Remove
.gitdirectory and rungit initto clean up the history - Change the name in
package.json- it will be the name of the IIFE bundle global variable and bundle files name (.cjs,.mjs,.iife.js,d.ts) - Change the author name in
LICENSE - Clean up the
READMEandCHANGELOGfiles
And, enjoy :)
Usage
The starter contains the following scripts:
dev- starts dev serverbuild- generates the following bundles: CommonJS (.cjs) ESM (.mjs) and IIFE (.iife.js). The name of bundle is automatically taken frompackage.jsonname propertytest- starts vitest and runs all teststest:coverage- starts vitest and run all tests with code coverage reportlint:scripts- lint.tsfiles with eslintlint:styles- lint.cssand.scssfiles with stylelintformat:scripts- format.ts,.htmland.jsonfiles with prettierformat:styles- format.csand.scssfiles with stylelintformat- format all with prettier and stylelintprepare- script for setting up husky pre-commit hookuninstall-husky- script for removing husky from repository
Acknowledgment
If you found it useful somehow, I would be grateful if you could leave a star in the project's GitHub repository.
Thank you.
Related Packages
@chronicstone/vue-route-query
Type-safe URL query parameter synchronization for Vue 3 with Zod validation
3,077
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 0.1.1 | ^3.3.2 | ||
| 0.1.0 | ^3.3.2 |