相关疑难解决方法(0)

咕噜咕噜的手表和手写笔

无法想象如何嵌套grunt 手表手写笔编译器(livereload将在以后出现)

我也试过使用"new"grunt newer,但我的代码肯定有问题.

有什么建议吗?

grunt.initConfig({

  stylus: {
    compile: {
      options: {
        paths: ['stylus'],

        import: [      
          'nib/*'
        ]
      },
      files: {
        'css/style.css': 'stylus/style.styl', 
      },
    },

  },
  watch: {
    stylus: {
      files: ['*/*.*'],
      task: ['newer:stylus:compile'],
      options : { livereload: true },
    },
  },

});


grunt.loadNpmTasks('grunt-contrib-stylus');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-newer');

grunt.registerTask('compile', ['newer:stylus:all']);
Run Code Online (Sandbox Code Playgroud)

此外,如果我跑grunt watch,它运作良好,但什么都不做.并且,如果我运行grunt stylus,它完全编译我的CSS.

javascript stylus gruntjs

3
推荐指数
1
解决办法
1873
查看次数

标签 统计

gruntjs ×1

javascript ×1

stylus ×1