json package.json用于es6 browserify项目

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了json package.json用于es6 browserify项目相关的知识,希望对你有一定的参考价值。

{
  "name": "babel",
  "version": "1.0.0",
  "description": "Website ",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "vendor-js": "mkdirp ./public/js/ && browserify  -r VENDOR_DEPENDENCIES  | uglifyjs > ./public/js/vendor.js",
    "browserify-js": "mkdirp ./public/js/ && browserify --debug -t [babelify --presets [ es2015 ] ] -t brfs -x VENDOR_DEPENDENCIES ./src/index.js --standalone pictoGraphic  > ./public/js/pictoGraphic.js",
    "process-sass": "mkdirp ./public/css/ && node-sass ./src/sass/main.scss ./public/css/main.css",
    "copy-static": "copyfiles  ./src/static/**/* ./public/static",
    "process-html": "copyfiles -f ./src/index.html ./public",
    "build": "npm run process-html & npm run browserify-js ",
    "watch-js": "fsmonitor -d './src' -s '+*.js' '+*.html' '!*/public/*' npm run build",
    "watch-static": "fsmonitor -d './src/static' -s npm run copy-static",
    "watch-sass": "fsmonitor -d './src/sass' -s '+*.scss'  npm run process-sass",
    "watch-vendor": "fsmonitor -d './node-modules' -s '+*.js' '+*.html' '!*/public/*' npm run vendor-js",
    "start": "npm run watch-js & npm run watch-vendor & npm run watch-static & npm run watch-sass  & static -p 3001 ./public"
  },
  "author": "Adam Davis <adam@admataz.com>",
  "license": "MIT",
  "dependencies": {

  },
  "devDependencies": {
    "babel-preset-es2015": "^6.13.2",
    "babel-register": "^6.14.0",
    "babelify": "^7.3.0",
    "brfs": "^1.4.3",
    "browserify": "^13.1.0",
    "copyfiles": "^1.0.0",
    "fsmonitor": "^0.2.4",
    "mkdirp": "^0.5.1",
    "node-sass": "^3.10.1",
    "node-static": "^0.7.8",
    "uglifyjs": "^2.4.10"
  }
}

以上是关于json package.json用于es6 browserify项目的主要内容,如果未能解决你的问题,请参考以下文章

es6转码和package.json中的配置

在 ES6 Node.js 中导入“.json”扩展会引发错误

.babelrc 配置放在 package.JSON

json 用于Docker教程的package.json示例

json 用于快速体系结构的package.json文件

json 用于新npm包的package.json样板文件