Template using vitejs and typescript (and more) for create easily and quickly nice JS library !
- 🦾 TypeScript, of course
- 🎨 Lint your commit with commitlint using conventional commits
- 🎨 Lint your code with typescript-eslint
- 🎨 Format your code with prettier
- 💄 Perform scss using sass
- ⚓ Manage your commit hook width husky
- ⚙️ Unit Testing with Vitest
- 🧪 E2E Testing with Playwright
- 📝 Generate change log based on commit using commit-and-tag-version
- 📄 Generate static site using vitepress
- 🗒 Generate markdown doc from ts using typedoc and typedoc-plugin-markdown
- 🏷️ Generate declaration files with vite-plugin-dts
- Trigger custom event with tiny plugin MicroEvent
- Create plugin(s) with tiny plugin MicroPlugin
When you use this template, try follow the checklist to update your info properly
- Change the class name file
- Change the class name file in
src
then the class name inindex.html
/vite.config.ts
/src/MyClass.ts
AND in scriptbuild:docs
intopackage.json
- Change url for repo in
.versionrc.json
- Add your style to
src/scss/style.scss
(optionnal) - Add the favicon in
public
(optional) - Clean up the README (optional)
- Update you website name and more in
docs
folder or remove it and updatedocs:api
script
Just run and visit http://localhost:5173/
yarn dev
To build the lib, run
yarn build
And you will see the generated file in dist that ready to be served.
Run dev mode website
yarn docs:dev
for more you can see
docs/package.json
scripts
Generate api doc from typedoc
yarn build:api
yarn release -- --first-release
See all availables options here
yarn release
you can precise version using major
, minor
or patch
yarn release -- --release-as minor
or you can pass specific version
yarn release -- --release-as 1.1.0