3
を提供する必要があります。私は私のワークステーションを設定一息-ルビーSASSエラー:これは私のディレクトリ構造であるパターン
、と私は私のフォルダ形式で動作するように私のがぶ飲みファイルを設定し、それ正しく動作していません。
これは私のガルプファイルです:問題は何
(node:6668) 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.
[08:42:23] Using gulpfile /var/www/html/evandro/sistema_metas/gulpfile.js
[08:42:23] Starting 'sass'...
[08:42:23] 'sass' errored after 7.09 ms
[08:42:23] Error: must provide pattern
:
var gulp = require('gulp'),
sass = require('gulp-ruby-sass'),
imagemin = require('gulp-imagemin'),
changed = require('gulp-changed'),
browserSync = require('browser-sync'),
livereload = require('gulp-livereload'),
gp_concat = require('gulp-concat'),
gp_rename = require('gulp-rename'),
gp_uglify = require('gulp-uglify'),
watch = require('gulp-watch');
gulp.task('sass', function() {
gulp.src('./app/template/css/style_v1.scss')
.pipe(sass())
.on('error', function (err) { console.log(err.message); })
.pipe(gulp.dest('./dist/css'))
.pipe(livereload());
});
gulp.task('compress', function() {
gulp.src('./app/*.js')
.pipe(gp_concat('concat.js'))
.pipe(gulp.dest('dist'))
.pipe(gp_rename('script.min.js'))
.pipe(gp_uglify())
.pipe(gulp.dest('./dist/js'));
});
gulp.task('jpg', function() {
gulp.src('./template/img/**/*.*')
.pipe(changed('./dist/img/'))
.pipe(imagemin({
progressive: true
}))
.pipe(gulp.dest('./dist/img/'));
});
gulp.task('browser-sync', function() {
browserSync.init(['./dist/css/**', 'index.php'], {
server: {
baseDir: './',
index: 'index.php'
}
});
});
gulp.task('watch', ['sass', 'browser-sync','compress'], function() {
return watch('./app/template/css/style_v1.scss', function() {
gulp.src('./app/template/css/style_v1.scss')
.pipe(gulp.dest('build'));
});
});
私はgulp watch
を実行すると、それはこれを返しますか?
私は別のコードを持っていますが、CSS Watchは動作せず、ただHTMLを見ています。それは何ですか?
おかげで、完全に働いた今、私はウォッチSASSを確認し、:それはあなたが正常に他のほとんどの一気のプラグインのと同じように、あなたが
.pipe()
を使用することができます。 – Shelon