Grunt Sass - 输出错误到控制台?

时间:2015-02-18 12:39:09

标签: google-chrome sass console.log grunt-contrib-watch

以下是我的grunt文件,使用 grunt-sass grunt-contrib-watch 来 编译我的Sass。是否可以将错误记录到chrome?

module.exports = function(grunt) {

  // Project configuration.
  grunt.initConfig({

    // Sass to CSS
    sass: {
      app: {
        files: [{
          expand: true,
          cwd: 'wp-content/themes/bones/library/scss',
          src: ['*.scss'],
          dest: 'wp-content/themes/bones/library/css',
          ext: '.css'
        }],

      },
      options: {
        sourceMap: true,
        outputStyle: 'nested',
        imagePath: "../",
      }


    },

    watch: {
      sass: {
        files: ['wp-content/themes/bones/library/scss/{,*/}*.{scss,sass}'],
        tasks: ['sass']
      },
      options: {
        livereload: true,
        spawn: false
      }
    },
  });


  grunt.loadNpmTasks('grunt-sass');
  grunt.loadNpmTasks('grunt-contrib-watch');


      grunt.registerTask('default', ['sass', 'watch']);
    };

0 个答案:

没有答案