A
A
Alexey2015-07-28 12:16:39
Angular
Alexey, 2015-07-28 12:16:39

Grunt and Less? No "less" targets found?

Installed via angular-generator (Yeoman) the structure of the future project.
I plan to use LESS.
What I have:
npm install grunt-contrib-less --save-dev
Gruntfile.js

watch: {
            tests: '<%= nodeunit.tests %>',
            tasks: 'default',
            styles: {
                files: ['app/styles/less/*.less'], // which files to watch
                tasks: ['less']
            }
        },

less: {
            development: {
                options: {
                    paths: ["app/styles/less"],
                    yuicompress: true
                },
                files: {
                    // target.css file: source.less file
                    "app/styles/main.css": "app/styles/less/main.less"
                }
            }
        },

grunt.loadNpmTasks('grunt-contrib-less');
grunt.registerTask('default', ['jshint', 'clean', 'copy', 'useminPrepare', 'ngtemplates', 'concat', 'uglify', 'cssmin', 'usemin', 'nodeunit', ' less']);
When I run grunt less: I get the error:
>> No "less" targets found.
Warning: Task "less" failed. Use --force to continue.
Tell me how to fix this?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis Ineshin, 2015-07-28
@IonDen

Do you already have something in "app/styles/less"? Have you checked the paths?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question