使用vue-cli腳手架新建的項(xiàng)目中,含有package.json。
創(chuàng)新互聯(lián)秉承專業(yè)、誠信、服務(wù)、進(jìn)取的價(jià)值觀,堅(jiān)持以客戶為中心、客戶至上的服務(wù)理念,以“關(guān)注企業(yè)需求,實(shí)現(xiàn)企業(yè)價(jià)值”為導(dǎo)向,努力為企業(yè)提供全面優(yōu)質(zhì)的互聯(lián)網(wǎng)應(yīng)用服務(wù)。服務(wù)包括空間域名、虛擬主機(jī)、企業(yè)郵箱、網(wǎng)站建設(shè)、網(wǎng)站優(yōu)化、網(wǎng)絡(luò)營銷解決方案和咨詢服務(wù),以幫助企業(yè)客戶應(yīng)用互聯(lián)網(wǎng)。package.json是npm的配置文件,里面設(shè)定了腳本以及項(xiàng)目依賴的庫。 npm run dev 這樣的命令就寫在package.json里。
{ "name": "vue-manage", // 項(xiàng)目名稱 "version": "1.0.0", // 版本 "description": "Reimbursement Manage", // 描述 "author": "LXG", // 作者 "private": true, //是否私人項(xiàng)目 "scripts": { "dev": "node build/dev-server.js", // npm run dev 的 dev,使用node執(zhí)行 build/dev-server.js "start": "node build/dev-server.js", // npm run start 跑的是同樣的命令 "build": "node build/build.js", // npm run build 跑的是 node build/build.js // 以下腳本為單元測試用到的腳本 // 以下腳本為單元測試用到的腳本 "unit": "cross-env BABEL_ENV=test karma start test/unit/karma.conf.js --single-run", "e2e": "node test/e2e/runner.js", "test": "npm run unit && npm run e2e" }, "dependencies": { // dependencies 設(shè)定的是項(xiàng)目里使用的依賴 "vue": "^2.2.6", "vue-router": "^2.3.1", "element-ui": "1.3.1", "vue-datasource": "1.0.9", "axios": "^0.15.3", "vue-core-image-upload": "2.1.5", "mockjs": "^1.0.1-beta3", "babel-polyfill": "^6.23.0" }, "devDependencies": { //devDependencies設(shè)定的是開發(fā)使用的依賴 "autoprefixer": "^6.7.2", // 是用于給css3屬性自動(dòng)加屬性前綴的 "babel-core": "^6.22.1", // babel相關(guān)的都是用于處理es6語法的 "babel-loader": "^6.2.10", "babel-plugin-transform-runtime": "^6.22.0", "babel-preset-env": "^1.3.2", "babel-preset-stage-2": "^6.22.0", "babel-register": "^6.22.0", "chalk": "^1.1.3", // chalk適用于格式化輸出命令行信息的,比如run dev以后的start... "connect-history-api-fallback": "^1.3.0", "copy-webpack-plugin": "^4.0.1", "css-loader": "^0.28.0", // 所有的*-loader都是 webpack的擴(kuò)展,webpack是把各種資源理解為一個(gè)模塊,css-loader就是讀取css模塊的加載器 "eslint": "^3.19.0", // eslint 相關(guān)是代碼格式化檢查工具,開啟以后要嚴(yán)格遵照它規(guī)定的格式進(jìn)行開發(fā) (我一般把它關(guān)了,為了顯示特意加上的) "eventsource-polyfill": "^0.9.6", "express": "^4.14.1", // express 用于啟動(dòng) node http server的服務(wù) "extract-text-webpack-plugin": "^2.0.0", "file-loader": "^0.11.1", "friendly-errors-webpack-plugin": "^1.1.3", "html-webpack-plugin": "^2.28.0", // webpack 里載入和處理html的插件 "http-proxy-middleware": "^0.17.3", // node server 的中間件工具 "webpack-bundle-analyzer": "^2.2.1", "cross-env": "^4.0.0", // 設(shè)定環(huán)境變量的工具,NODE_ENV變量跟它有關(guān) "karma": "^1.4.1", // karma相關(guān)的都是單元測試工具 "karma-coverage": "^1.1.1", "karma-mocha": "^1.3.0", "karma-phantomjs-launcher": "^1.0.2", "karma-phantomjs-shim": "^1.4.0", "karma-sinon-chai": "^1.3.1", "karma-sourcemap-loader": "^0.3.7", "karma-spec-reporter": "0.0.30", "karma-webpack": "^2.0.2", "lolex": "^1.5.2", "mocha": "^3.2.0", "chai": "^3.5.0", "sinon": "^2.1.0", "sinon-chai": "^2.8.0", "inject-loader": "^3.0.0", "babel-plugin-istanbul": "^4.1.1", "phantomjs-prebuilt": "^2.1.14", "chromedriver": "^2.27.2", "cross-spawn": "^5.0.1", "nightwatch": "^0.9.12", "selenium-server": "^3.0.1", // 一個(gè)版本檢查工具 "semver": "^5.3.0", // selljs是在node里跑shell命令的工具,比如‘rm -rf' "shelljs": "^0.7.6", "opn": "^4.0.2", // 跨平臺(tái)的開啟文件或者網(wǎng)頁的工具 "optimize-css-assets-webpack-plugin": "^1.3.0", "ora": "^1.2.0", // 命令行里自動(dòng)運(yùn)行的信息提示 "rimraf": "^2.6.0", // 跑shell命令 rm-rf 的工具 "url-loader": "^0.5.8", // 配合webpack的加載器 "vue-loader": "^11.3.4", // 配合webpack的加載器 "vue-style-loader": "^2.0.5", // 配合webpack的加載器 "vue-template-compiler": "^2.2.6", // vue-template-compiler,可能是配合離線版vue "webpack": "^2.3.3", // webpack相關(guān)的用于,把圖片,*.vue, *.js, 這些組合成最終的項(xiàng)目,webpack-dev用于跑測試服務(wù)器 "webpack-dev-middleware": "^1.10.0", "webpack-hot-middleware": "^2.18.0", "webpack-merge": "^4.1.0", "babel-preset-es2015": "^6.22.0", "function-bind": "^1.1.0", "webpack-bundle-analyzer": "^2.2.1" }, // 項(xiàng)目依賴的引擎版本 "engines": { "node": ">= 4.0.0", "npm": ">= 3.0.0" }, "browserslist": [ "> 1%", "last 2 versions", "not ie <= 8" ] }
另外有需要云服務(wù)器可以了解下創(chuàng)新互聯(lián)建站www.cdcxhl.com,海內(nèi)外云服務(wù)器15元起步,三天無理由+7*72小時(shí)售后在線,公司持有idc許可證,提供“云服務(wù)器、裸金屬服務(wù)器、高防服務(wù)器、香港服務(wù)器、美國服務(wù)器、虛擬主機(jī)、免備案服務(wù)器”等云主機(jī)租用服務(wù)以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡單易用、服務(wù)可用性高、性價(jià)比高”等特點(diǎn)與優(yōu)勢,專為企業(yè)上云打造定制,能夠滿足用戶豐富、多元化的應(yīng)用場景需求。