Vue-Donut
is a template work with vue-cli
, it helps you build your own VueJS basic UI component library in an easy way.
vue init jrainlau/vue-donut <your-project>
-
yarn run dev
: Development mode- Is similar to vue-webpack-boilerplate
-
yarn run build
: Pack and publish mode- Using
src/components/index.js
as the entry file, pack it bywebpack
, then output todist
folder. dist/index.js
is the library you will publish tonpm
.- You should be familiar with how to write a vue.js plugin
src/components/index.js
should be like this:import myComponent from './my-component.vue' const install = (Vue) => { Vue.component('my-componen', myComponent) } export default install
- Using
-
yarn run doc
: Building document mode- By running
yarn run dev
, you are building a normal SPA application. After all things being done, you could use this command to build your SPA.app.[hash].js
,vendor.[hash].js
andmanifest.[hash].js
and extract css files would be outputted to thedocs
folder. - Source maps
*.[hash].map
would be created automatically. - Use
docs
folder as the source ofgithub pages
.
- By running
MIT