assemble / assemble-less

Grunt task for compiling LESS to CSS. This task does for less what Assemble does for HTML, making it much easier to modularize and reduce repetition in stylesheets.
http://github.com/assemble/assemble/
MIT License
66 stars 20 forks source link

Error : Warning: Task "less" not found. Use --force to continue. #28

Closed ethyde closed 10 years ago

ethyde commented 10 years ago

Hi, I try to use this plugin for a project, I run the task with grunt less but i have the error "Warning: Task "less" not found. Use --force to continue.". grunt-contrib-less work perfectly but i need @import options. Can you help me ?

My grunt task is :

less: {
    options: {
        paths: 'assets/css',
        imports: {
            less: ['normalize.css']
        }
    },
    files: {
        src:'<%= meta.files.less %>/base.less',
        dest: '<%= meta.files.destAssets %>/css/base.css'
    }
}

Thanks for all and sorry for my bad english.

jonschlinkert commented 10 years ago

Sounds like the task isn't being loaded. Are you using something like load-grunt-tasks? If so, it will only load tasks with the name grunt, so you have to add it to the gruntfile. e.g

grunt.loadNpmTasks('assemble-less');
ethyde commented 10 years ago

Ok, it's work ! :) But now i have the following error with assemble-less : "Warning: An error occurred while processing a template (Cannot read property 'dest' of undefined). Use --force to continue" but not with grunt-contrib-less

jonschlinkert commented 10 years ago

It sounds like a lodash template issue. something in your config is defined wrong. Do a search for .dest in the gruntfile (and any config files that you have, e.g. grunt.file.readJSON('foo.json')), you might see the inconsistency.

If you can't find it, try using real filepaths for dest values, instead of config templates until you find which one is causing it. (e.g. do foo/bar/*.html instead of <%= foo.bar %>/*.html.

ethyde commented 10 years ago

All right Thanks for all ! :)

jonschlinkert commented 10 years ago

no prob!