An easy-to-use vue-cli template to publish components
Share Vue components to the world!
A very simple vue-cli template to write and publish vue plugins with
- Very easy to use template with webpack 2.0 pre-configured
- Supports Import and Browser installation for your plugin with distribution-ready files
- Supports Less, Sass/Scss and Stylus
- Easy development with auto-compilation and publishing to npm
npm i -g vue-cli vue init Akryum/vue-share-components plugin-name
The first time you create or clone your plugin, you need to install the default dependencies:
Watch and compile
This will run webpack in watching mode and output the compiled files in the
npm run dev
Use it in another project
While developing, you can follow the install instructions of your plugin and link it into the project that uses it.
In the plugin folder:
In the other project folder:
npm link your-plugin-name
This will install it in the dependencies as a symlink, so that it gets any modifications made to the plugin.
Publish to npm
You may have to login to npm before, with
npm adduser. The plugin will be built in production mode before getting published on npm.
This will build the plugin into the
dist folder in production mode.
npm run build