嗨,我刚接触到了gulp,我已经安装了nodejs和gulp现在我正在尝试编译我的.scss文件,该文件使用“gulp watch”成功观看,但它没有输出css。
节点-v:0.12.4 gulp -v:3.9.0
var gulp = require('gulp');
var sass = require('gulp-ruby-sass');
var sass = require('gulp-sass');
var minifyCSS = require('gulp-minify-css');
var rename = require('gulp-rename');
gulp.task('scss', function () {
gulp.src('scss/*.scss')
.pipe(sass({
outputStyle: 'nested',
includePaths: ['scss', 'bower_components/meyer-reset/stylesheets']
}))
.pipe(gulp.dest('css'))
.pipe(minifyCSS())
.pipe(rename({suffix: '.min'}))
.pipe(gulp.dest('css'));
});
gulp.task('watch', function () {
gulp.watch('scss/*.scss', ['scss']);
});
gulp.task('default', ['scss']);
的package.json
{
"devDependencies": {
"gulp": "^3.9.0",
"gulp-debug": "^2.0.1",
"gulp-minify-css": "^1.1.1",
"gulp-rename": "^1.2.2",
"gulp-sass": "^1.3.3"
}
}