gulp-pleeeaseがうまくインストールできません。
postcss、cssnextはできました。
これらは別ファイルにしないといけないのでしょうか?
・npm install --save-dev gulp-pleeease
C:\Users\usr\Desktop\images\gulp-folder\postcss>npm install --save-dev gulp-pleeease npm WARN deprecated graceful-fs@3.0.8: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree. npm WARN deprecated npmconf@2.1.2: this package has been reintegrated into npm and is now out of date with respect to npm npm WARN deprecated cross-spawn-async@2.2.4: cross-spawn no longer requires a build toolchain, use it instead! npm WARN prefer global node-gyp@3.3.1 should be installed with -g > node-sass@3.4.2 install C:\Users\usr\Desktop\images\gulp-folder\postcss\node_modules\node-sass > node scripts/install.js Cannot download "https://github.com/sass/node-sass/releases/download/v3.4.2/win32-x64-48_binding.node": HTTP error 404 Not Found Hint: If github.com is not accessible in your location try setting a proxy via HTTP_PROXY, e.g. export HTTP_PROXY=http://example.com:1234 or configure npm proxy via npm config set proxy http://example.com:8080 > spawn-sync@1.0.15 postinstall C:\Users\usr\Desktop\images\gulp-folder\postcss\node_modules\spawn-sync > node postinstall > node-sass@3.4.2 postinstall C:\Users\usr\Desktop\images\gulp-folder\postcss\node_modules\node-sass > node scripts/build.js 〜
・gulpfile.js
//gulpfile.js var gulp = require('gulp'); //gulpをインポート var postcss = require('gulp-postcss'); //gulp-postcssをインポート var cssnext = require('postcss-cssnext'); //cssnextをインポート var plumber = require('gulp-plumber'); var pleeease = require('gulp-pleeease'); gulp.task('css', function () { //”css”タスクを登録 var plugins = [ cssnext //一旦空の配列を作成 ]; return gulp.src('./src/*.css') //src下にある.cssファイルを指定 .pipe(postcss(plugins)) //PostCSSにファイルを処理してもらう .pipe(gulp.dest('./dest')) //生成されたCSSをdest下に配置 .pipe(plumber()) .pipe(pleeease({ autoprefixer:true, minifier: true, mqpacker: true })); });
・gulp cssコマンドでgulpfile.jsを実行すると下記のようになります。
C:\Users\usr\Desktop\images\gulp-folder\postcss>gulp css (node:6348) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version. module.js:442 throw err; ^ Error: Cannot find module 'gulp-pleeease' at Function.Module._resolveFilename (module.js:440:15) at Function.Module._load (module.js:388:25) at Module.require (module.js:468:17) at require (internal/module.js:20:19) at Object.<anonymous> (C:\Users\usr\Desktop\images\gulp-folder\postcss\gulpfile.js:6:16) at Module._compile (module.js:541:32) at Object.Module._extensions..js (module.js:550:10) at Module.load (module.js:458:32) at tryModuleLoad (module.js:417:12) at Function.Module._load (module.js:409:3)
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
退会済みユーザー
2016/06/19 05:02
退会済みユーザー
2016/06/19 05:04
2016/06/19 06:56