美文网首页
nuxt项目中package.json的配置解读

nuxt项目中package.json的配置解读

作者: muroujue | 来源:发表于2018-05-10 17:38 被阅读0次
    {
    
      "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的配置解读

          本文链接:https://www.haomeiwen.com/subject/khrtdftx.html