vehicle-widget
v1.0.3
Published
A starter vanilla-ts (extended) template that began with Vite 3.x, prepared for writing node utility libraries in typescript. This starter is meant to provide rapid node package development and publishing onto npm.
Downloads
33
Maintainers
Readme
vite-vanilla-ts-template-extended (AKA vite-vanilla-ts-module
)
A starter vanilla-ts
(extended) template that began with Vite 3.x, prepared for writing node
utility libraries in typescript
. This starter is meant to provide rapid node
package development and publishing onto npm
.
Getting Started
yarn
yarn prepare
npx husky add .husky/pre-commit "yarn build"
npx husky add .husky/pre-commit "yarn prettier"
Lastly, your file .husky/pre-commit
should look like below:
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
yarn build
yarn prettier
Testing with Vitest
Run yarn test:run
or yarn test:coverage
to produce code coverage report.
The code coverage report will indicate, if all test cases are 100% covered, flawed logic and so on.
Running vite
Run yarn dev
to open index.html
via http://localhost:5174
.
It contains some quick links, to the stats.html
and coverage index.html
files.
Build your package
Run yarn build
, and check the dist
folder for the final build output.
If there are issues with the package, check
package.json
(propsmain
,module
,typings
,files
and etc),tsconfig.json
(such asallowJs
) and dependency versions (especiallyvite
) to narrow down the build or typings errors you're experiencing.
Publishing
And when ready to publish to npm
:
npm login
npm publish