這是一個完整的vue案例,可是接口彷佛都失效了,單是代碼自己仍是頗有參考價值的呦!~
裏面包含了:vue,vue-router,。。。。,仍是直接看json文件吧css
{ "name": "01.webpack-study", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", "dev": "webpack-dev-server --open --port 3000 --hot --host 127.0.0.1" }, "keywords": [], "author": "", "license": "ISC", "devDependencies": { "babel-core": "^6.26.0", "babel-loader": "^7.1.2", "babel-plugin-component": "^0.10.1", "babel-plugin-transform-remove-strict-mode": "^0.0.2", "babel-plugin-transform-runtime": "^6.23.0", "babel-preset-env": "^1.6.1", "babel-preset-stage-0": "^6.24.1", "css-loader": "^0.28.7", "file-loader": "^1.1.5", "html-webpack-plugin": "^2.30.1", "less": "^2.7.3", "less-loader": "^4.0.5", "node-sass": "^4.5.3", "sass-loader": "^6.0.6", "style-loader": "^0.19.0", "url-loader": "^0.6.2", "vue-loader": "^13.3.0", "vue-template-compiler": "^2.5.2", "webpack": "^3.8.1", "webpack-dev-server": "^2.9.3" }, "dependencies": { "bootstrap": "^3.3.7", "mint-ui": "^2.2.9", "moment": "^2.19.1", "vue": "^2.5.2", "vue-preview": "^1.0.5", "vue-resource": "^1.3.4", "vue-router": "^3.0.1", "vuex": "^3.0.1" } }
都用到了這些技術,嘿嘿嘿html
因此來講仍是很值得一看的,若是會寫接口的話,還能夠本身寫一個接口代替上去
OK,接下來就是就是具體的代碼了vue
因爲代碼太多,只好把他放在另外一個地方了,node
具體代碼webpack
不要忘了使用以前install哦,否則什麼都看不到,
install後運行:npm run dev
,便可自動在,默認瀏覽器打開,並支持,自動更新!!!git