【问题标题】:grunt-contrib-compass not work in npmgrunt-contrib-compass 在 npm 中不起作用
【发布时间】:2016-07-31 09:02:19
【问题描述】:

我已经安装了 npm 和 grunt,然后安装了 grunt-contrib-compass。 但是当我咕噜咕噜地跑的时候。我有这个错误

Running “compass:dist” (compass) task
Warning: not found: compass Use –force to continue.
Aborted due to warnings

这是我的 gruntfile.js

module.exports = function(grunt) {
grunt.initConfig({
    pkg: grunt.file.readJSON('package.json'),
    compass: {
        dist: {
            options: {
                sassDir: 'sass',
                cssDir: 'css'
            }
        }
    },
    watch: {
        css: {
            files: '**/*.scss',
            tasks: ['compass']
        }
    }
});
grunt.loadNpmTasks('grunt-contrib-compass');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.registerTask('default',['watch']);
}

【问题讨论】:

    标签: css sass npm gruntjs compass


    【解决方案1】:

    您需要安装 Compass Ruby gem,详见here。基本上你需要安装 Ruby,然后使用它你可以安装 Compass gem 并且 grunt-contrib-compass 应该可以工作

    【讨论】:

      猜你喜欢
      • 2013-09-08
      • 1970-01-01
      • 1970-01-01
      • 2014-11-06
      • 2015-09-06
      • 1970-01-01
      • 2013-04-05
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多