grunt不编译

时间:2018-06-17 21:42:17

标签: twitter-bootstrap-3 gruntjs less

我使用Bootstrap,我遇到了这个问题。

我已安装Grunt并仅编译data_large但不编译其他文件。

当我在导入style.less的文件中更改某些内容时,只有当我重新启动Grunt时才能正常工作。

可能出现什么问题?

修改

以下是我的style.less

Gruntfile.js

Gruntfile.js

我的主题文件夹:

module.exports = function(grunt) {

  require('jit-grunt')(grunt);

  grunt.initConfig({
    less: {
      development: {
        options: {
          compress: true,
          yuicompress: true,
          optimization: 2
        },
        files: {
          "css/style.css": "less/style.less"
        }
      }
    }, watch: {
      styles: {
        files: ['less/**/*.less'],
        tasks: ['less'],
        options: {
          nospawn: true
        }
      }
    }
  });

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

非常感谢

0 个答案:

没有答案
相关问题