1
安裝Gulp時有點麻煩。安裝和gulp插件
在我gulpfile.js我有這些要求:
var gulp = require('gulp');
var sass = require('gulp-sass');
var browserSync = require('browser-sync');
var del = require('del');
var notify = require("gulp-notify");
var htmlExtended = require("gulp-html-extend");
var imagemin = require('gulp-imagemin');
var pngquant = require('imagemin-pngquant');
var bower = require('gulp-bower');
而且在我的包,我有我的依賴關係:
{
"name": "PROJECT",
"version": "0.0.1",
"private": true,
"devDependencies": {
"browser-sync": "^2.11.0",
"del": "^1.2.0",
"gulp": "^3.9.0",
"gulp-bower": "^0.0.11",
"gulp-html-extend": "^1.1.4",
"gulp-imagemin": "^2.3.0",
"gulp-load-plugins": "^1.0.0-rc.1",
"gulp-notify": "^2.2.0",
"gulp-sass": "^2.0.1",
"imagemin-pngquant": "^4.2.0",
"lodash": "^3.9.3"
},
"scripts": {
"install": "bower install"
}
}
問題是,當我開始npm install
或npm install --save-dev
它安裝噸我沒有要求的插件。這裏是我的「node_modules」文件夾中安裝後:
如何才能只安裝我問我的package.json插件?
請考慮將其標記您的問題回答或編輯你的問題,以獲取更多信息。 :) –