Create Vibrary
A published-ready template for components and composable functions library.
- vite
- vitest
- storybook or viteplay for documentation
Scaffolding Your First Library
With NPM:
$ npm create vibrary@latest
With Yarn:
$ yarn create vibrary
With PNPM:
$ pnpm create vibrary
Then follow the prompts!
You can also directly specify the project name and the template you want to use via additional command line options. For example, to scaffold a Vite + Vue library, run:
npm create vibrary@latest my-vue-library --template vue-ts
npm create vibrary@latest my-vue-library -- --template vue-ts
yarn create vibrary my-vue-library -- --template vue-ts
pnpm create vibrary my-vue-library -- --template vue-ts
Currently supported template presets include:
Template presets still work in progress:
vanilla
vanilla-ts
vue
react-ts
preact
preact-ts
lit
lit-ts
svelte
svelte-ts
Release it!
Vibrary
For example, to release a new version of your lib,
run:
pnpm release
Then follow the prompts!
Troubleshooting hints
If you get an error when running pnpm release
, you maybe miss the git repository url in package.json
, for example, to add git repository url:
{
"repository": {
"type": "git",
"url": "git+https://github.com/your/your-repo-url.git"
}
}