使用vue-cli 快速构建自己的vue模板

前言:

1.vue-cli结合webpack模板很方便很贴心,但大多时候我们是需要属于自己的一套模板的。一方面这样模板拉取速度更快,另一方面可以根据需求组建特定的依赖

2.我们基于vue-cli webpack模板删减稍许东西,组成自己的template

正文:

  1. 获取源模板:
  2. 创建github仓库
  3. 把本地代码放到template文件夹中,上传至github
  4. 使用自己的模板
vue init webpack mysource
github new repository
git init
git commit -m "first commit"
git remote add origin https://github.com/anderlaw/vuelight.git
git push -u origin master
git add template //添加创建的template文件夹到git本地缓存区
git commit -m "add template dir"
git push -u origin master
vue init anderlaw/vuelight myproject



猜你喜欢

转载自blog.csdn.net/qq_40882724/article/details/80798850