を使用するgulp watch
と、次のように sass コンパイラ モジュールのエラーが発生します。
[01:41:22] Using gulpfile D:\Workspace\WebDev\agaweed\public_html\wp-content\themes\master\gulpfile.js
[01:41:22] Starting 'watch'...
[01:41:23] Finished 'watch' after 26 ms
[01:41:35] Starting 'styles'...
[01:41:35] 'sass' is not recognized as an internal or external command,
operable program or batch file.
events.js:160
throw er; // Unhandled 'error' event
^
Error: Gem undefined is not installed.
gulp-ruby-sassをロードし、タスクを次のようgulpfile.js
に追加しました。watch
// Load plugins
var gulp = require('gulp'),
sass = require('gulp-ruby-sass'),
autoprefixer = require('gulp-autoprefixer'),
cssnano = require('gulp-cssnano'),
jshint = require('gulp-jshint'),
uglify = require('gulp-uglify'),
imagemin = require('gulp-imagemin'),
rename = require('gulp-rename'),
concat = require('gulp-concat'),
notify = require('gulp-notify'),
cache = require('gulp-cache'),
livereload = require('gulp-livereload'),
del = require('del');
...
// Watch
gulp.task('watch', function() {
// Watch .scss files
gulp.watch('src/styles/**/*.scss', ['styles']);
// Watch .js files
gulp.watch('src/scripts/**/*.js', ['scripts']);
// Watch image files
gulp.watch('src/images/**/*', ['images']);
// Create LiveReload server
livereload.listen();
// Watch any files in dist/, reload on change
gulp.watch(['dist/**']).on('change', livereload.changed);
});
問題に関するヘルプは大歓迎です:)