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.

Home Page:http://github.com/assemble/assemble/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

ethyde opened this issue · comments

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.

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');

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

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.

All right Thanks for all ! :)

no prob!