实际项目就是一个单页面。所以,我以为用gulp足够,而且不须要webpack和vue-cli由于没有必要使用组件。css
先来讲一下项目结构html
1.vue
而后来看看个人包管理package.json都用了啥,你也能够复制下来,npm install进行安装就好了。webpack
{ "name": "webRoot", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "author": "", "license": "ISC", "devDependencies": { "babel-core": "^6.25.0", "babel-preset-es2015": "^6.24.1", "gulp": "^3.9.1", "gulp-babel": "^7.0.0", "gulp-concat": "^2.6.1", "gulp-connect": "^5.0.0", "gulp-htmlmin": "^3.0.0", "gulp-imagemin": "^3.3.0", "gulp-jshint": "^2.0.4", "gulp-less": "^3.3.2", "gulp-minify-css": "^1.2.4", "gulp-notify": "^3.0.0", "gulp-rename": "^1.2.2", "gulp-uglify": "^3.0.0", "imagemin-pngcrush": "^5.1.0", "jshint": "^2.9.5" } }
而后是个人gulpfile.js配置web
这里仍是用图片吧,动手敲一敲总仍是好的,给之后的本身也找点麻烦。
内容很少,可是很实用,因此我不会放弃治疗哒。vue-cli