前端使用gulp工具构建项目依赖包


package.json:
{
  "name": "project",
  "version": "0.0.0",
  "description": "this is a demo project",
  "main": "gulpfile.js",
  "scripts": {
    "test": "test Success"
  },
  "repository": {
    "type": "git",
    "url": "no"
  },
  "keywords": [
    "demo",
    "pc"
  ],
  "devDependencies": {
    "autoprefixer": "^6.3.3",
    "cssnano": "^3.5.2",
    "gulp": "^3.9.0",
    "gulp-concat": "^2.6.0",
    "gulp-clean": "^0.3.1",
    "gulp-livereload": "^3.8.1",
    "gulp-minify-css": "^1.2.3",
    "gulp-notify": "^2.2.0",
    "gulp-plumber": "^1.1.0",
    "gulp-postcss": "^6.1.0",
    "gulp-sass": "~2.0.4",
    "gulp-rename": "^1.2.2",
    "gulp-sourcemaps": "^1.6.0",
    "gulp-uglify": "^1.5.1",
    "gulp-imagemin": "^3.0.3",
    "imagemin-pngquant": "^4.0.0",
    "gulp-webserver": "^0.9.1",
    "gulp.spritesmith": "^6.0.0"
  }
}
View Code

安装方法:
1、下载 node.js安装,并配置环境变量.
2、
全局安装gulp npm install gulp -g .
3、
修改registry npm config set registry "https://registry.npm.taobao.org/".
4、 项目目录下运行 npm install或cnpm install(事先安装cnpm).

 

posted on 2017-01-17 17:32  专注前端100年  阅读(147)  评论(0编辑  收藏  举报

导航