Ionic css文件在第二个sass输出目录中为空

时间:2016-01-25 11:09:13

标签: sass ionic-framework gulp gulp-sass

我尝试在我的离子项目中添加第二个sass'循环'。这是我的 gulpfile.js

的相关部分
var paths = {
  sass: ['./scss/**/*.scss'],
  themesass: ['./www/data/theme/css/**/*.scss']
};

gulp.task('default', ['sass','themesass']);

gulp.task('sass', function(done) {
  gulp.src('./scss/ionic.app.scss')
    .pipe(sass())
    .on('error', sass.logError)
    .pipe(gulp.dest('./www/css/'))
    .pipe(minifyCss({
      keepSpecialComments: 0
    }))
    .pipe(rename({ extname: '.min.css' }))
    .pipe(gulp.dest('./www/css/'))
    .on('end', done);
});

gulp.task('themesass', function(done) {
  gulp.src('./www/data/theme/css/style.scss')
    .pipe(sass())
    .on('error', sass.logError)
    .pipe(gulp.dest('./www/data/theme/css/'))
    .pipe(minifyCss({
      keepSpecialComments: 0
    }))
    .pipe(rename({ extname: '.min.css' }))
    .pipe(gulp.dest('./www/data/theme/css/'))
    .on('end', done);
});

gulp.task('watch', function() {
  gulp.watch(paths.sass, ['sass']);
  gulp.watch(paths.themesass, ['themesass']);
});

在更改 style.css 时,我在终端中获得以下输出:

File changed: www/data/theme/css/style.scss
[12:07:03] Starting 'themesass'...
[12:07:03] Finished 'themesass' after 14 ms
CSS changed:  www/data/theme/css/style.css
CSS changed:  www/data/theme/css/style.min.css

两个文件( style.css style.min.css )都保持空白。我错过了什么?

0 个答案:

没有答案