Gruntjs grunt contrib less不工作(无错误但无输出css)

Gruntjs grunt contrib less不工作(无错误但无输出css),gruntjs,grunt-contrib-less,Gruntjs,Grunt Contrib Less,我有一个较少的编译grunt任务,其中grunt安装文件夹中较少文件的相对路径是raw/less/source\u map/ 这是grunt文件 Grunfile:(编辑:更改为@Yogesh Khatri的代码,仍然是相同的问题) 运行它时,命令行显示 ^CMacPro:grunt sagiavinashvarma$ grunt watch Running "watch" task Waiting... >> File "raw/less/source_map/style.less

我有一个较少的编译grunt任务,其中grunt安装文件夹中较少文件的相对路径是
raw/less/source\u map/

这是grunt文件

Grunfile:(编辑:更改为@Yogesh Khatri的代码,仍然是相同的问题)

运行它时,命令行显示

^CMacPro:grunt sagiavinashvarma$ grunt watch
Running "watch" task
Waiting...
>> File "raw/less/source_map/style.less" changed.
Running "less:files" (less) task

Done, without errors.
Completed in 1.862s at Tue Dec 09 2014 15:03:37 GMT+0530 (IST) - Waiting...
但是没有style.css输出。我写了最简单的咕噜任务,没有任何选择。 谁能指出这有什么问题。

编辑: 我有问题。它不起作用,因为较少的任务需要特定的目标来起作用。
尝试像这样更改代码

module.exports = function(grunt) {
    grunt.initConfig({
        less: {
          development: {
            files: { "raw/less/source_map/style.css" : "raw/less/source_map/style.less" }
          }
        },
        watch: {
            js: {
                files: ['raw/less/source_map/style.less'],
                    tasks: ['default'],
                }
        }
    });
    grunt.loadNpmTasks('grunt-contrib-less');
    grunt.loadNpmTasks('grunt-contrib-watch');
    grunt.registerTask('default', ['less']);
};
我通过运行
grunt--verbose
得到了错误,它显示了关于任务的更多信息。它给了我这样的输出

Verifying property less.files exists in config...OK
File: [no files]
Options: report="min", banner=""
>> Destination not written because no source files were provided.

其中搜索导致我这样做:-

my bad我更改了代码。仍然没有产出。没有错误
Verifying property less.files exists in config...OK
File: [no files]
Options: report="min", banner=""
>> Destination not written because no source files were provided.