2014-11-03 2 views
1

를 다시로드하지 않습니다 : 그것은 한 번 CSS를 다시로드 한 후이 오류와 충돌합니다 Gulp.js이 내 Gulpfile입니다 일반 CSS를

var gulp   = require('gulp'), 
    watch  = require('gulp-watch'), 
    livereload = require('gulp-livereload'); 


gulp.task('watch', function() { 
    livereload.listen(); 

    gulp.watch('./css/**/*.css', ['css']).on('change', livereload.changed); 
    gulp.watch('./js/**/*.js', ['js']).on('change', livereload.changed); 
    gulp.watch('./**/*.php').on('change', livereload.changed); 
}); 

gulp.task('default', [ 'watch']); 

:로 만들기 위해 무엇을

[15:30:13] style.css was reloaded. 
[15:30:13] Task 'css' is not in your gulpfile 
[15:30:13] Please check the documentation for proper gulpfile formatting 

확실하지 않음 누구나 비슷한 문제가 있었나요?

답변

1

먼저 당신은 당신이 다음, 변경 한 경우,이 파일을보고 작업을 다시 실행이 CSS

gulp.task('css', function() { 
    return gulp.src('./css/**/*.css') 
      .pipe(livereload()); 
}); 

로 할 수있는 것들로 작업을 작성해야합니다.

+0

힙합을 생각해 냈습니다. D –