Node.js (2) babel & uglify的使用

{
  "name": "chap4",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "babel": "./node_modules/.bin/babel browser.js -d build/",
    "uglify": "./node_modules/.bin/uglifyjs build/browser.js -o build/browser.min.js",
    "build": "npm run babel && npm run uglify"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "devDependencies": {
    "babel-cli": "^6.26.0",
    "babel-preset-es2015": "^6.24.1",
    "uglify-es": "^3.3.9"
  }
}
发布了334 篇原创文章 · 获赞 1 · 访问量 1万+

猜你喜欢

转载自blog.csdn.net/qq_37769323/article/details/104445386