{
"name": "nuxt-project", //必须项(否则无法install)
"version": "1.0.0", //必须项(否则无法install)
"description": "Nuxt.js project", //简单描述
"author": "yourName", //作者
"private": true,
"scripts": { //指定了运行脚本命令的npm命令行缩写 使用npm run ** 运行
"precommit": "npm run lint",
"lint": "eslint --ext .js,.vue --ignore-path .gitignore .",
//--ext用来指定检测的文件格式
"build": "nuxt build && backpack build",
"generate": "nuxt generate",
"dev": "cross-env NODE_ENV=development RUN_ENV=local backpack dev",
//cross-env包能够提供一个设置环境变量的scripts,让你能够以unix方式设置环境变量,并且兼容多种运行环境
"start": "cross-env NODE_ENV=production RUN_ENV=local pm2 start build/main.js -f -i max --watch=build",
"dev-main": "cross-env NODE_ENV=development HOST=10.40.3.8 PORT=3002 RUN_ENV=main backpack dev",
//主干环境配置
"start-main": "cross-env NODE_ENV=production HOST=10.40.3.8 PORT=3002 RUN_ENV=main pm2 start build/main.js -f -i max --watch=build",
"dev-qa": " cross-env NODE_ENV=development HOST=10.40.3.20 PORT=3002 RUN_ENV=qa backpack dev",
//QA环境配置
"start-qa": "cross-env NODE_ENV=production HOST=10.40.3.20 PORT=3002 RUN_ENV=qa pm2 start build/main.js -f -i max --watch=build",
"dev-prod": " cross-env NODE_ENV=development RUN_ENV=prod backpack dev",
"start-prod1": "cross-env NODE_ENV=production HOST=192.168.1.101 PORT=3002 RUN_ENV=prod pm2 start build/main.js -f -i max --watch=build",
"start-prod2": "cross-env NODE_ENV=production HOST=192.168.1.102 PORT=3002 RUN_ENV=prod pm2 start build/main.js -f -i max --watch=build"
},
"dependencies": { //项目运行所依赖的模块
"axios": "^0.16.2",
"body-parser": "^1.18.2",
"cookie-parser": "^1.4.3",
"cross-env": "^5.0.1",
"express": "^4.15.3",
"js-cookie": "^2.2.0",
"log4js": "^2.3.12",
"mint-ui": "^2.2.13",
"moment": "^2.22.0",
"nuxt": "^1.4.0",
"source-map-support": "^0.4.15",
"vue-cookie": "^1.1.4"
},
"devDependencies": { //项目开发所依赖的模块
"babel-eslint": "^7.2.3",
"babel-plugin-component": "^0.10.1",
"backpack-core": "^0.4.1",
"eslint": "^4.3.0",
"eslint-config-standard": "^10.2.1",
"eslint-loader": "^1.9.0",
"eslint-plugin-html": "^3.1.1",
"eslint-plugin-import": "^2.7.0",
"eslint-plugin-node": "^5.1.1",
"eslint-plugin-promise": "^3.5.0",
"eslint-plugin-standard": "^3.0.1",
"node-sass": "^4.5.3",
"sass-loader": "^6.0.6",
"swiper": "^4.2.0"
}
}
nuxt项目中package.json的配置解读
最后编辑于 :
©著作权归作者所有,转载或内容合作请联系作者
- 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
- 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
- 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
推荐阅读更多精彩内容
- 通常我们使用npm init命令来创建一个npm程序时,会自动生成一个package.json文件。package...
- cnodejs读取站点配置信息的方法是定义了一个config.js 在需要读取的页面进行读取 但对于站点名称,代码...
- 每个项目的根目录下面,一般都有一个package.json文件,定义了这个项目所需要的各种模块,以及项目的配置信息...
- 各位观众老爷大家好,欢迎大家来到内裤讲解的web前端大讲堂, 我是你们的老朋友,内裤。 这次要给大家带来的呢是no...