0
0
0348raven2015-08-12 08:27:36
Less
0348raven, 2015-08-12 08:27:36

How to generate beautiful css from less using grunt?

I want the final file to be formed not in one line, as I have now, but as a regular css file in a column.
content of gruntfile.js:

module.exports = function(grunt) {
    grunt.initConfig({
        less: {
            development: {
                options: {
                    compress: true,
                    yuicompress: true,
                    optimization: 2
                },
                files: {
                    // target.css file: source.less file
                    "css/styles_super.css": "css/styles.less"
                }
            }
        },
        watch: {
            styles: {
                files: ['css/**/*.less'], // which files to watch
                tasks: ['less'],
                options: {
                    nospawn: true
                }
            }
        }
    });

    grunt.loadNpmTasks('grunt-contrib-less');
    grunt.loadNpmTasks('grunt-contrib-watch');

    grunt.registerTask('default', ['watch']);
};

Thanks in advance for the replies!
If you need any clarification, please ask.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
moserevg, 2015-08-12
@0348raven

Try:

compress: false,
yuicompress: false

A
Alexey Ukolov, 2015-08-12
@alexey-m-ukolov

https://github.com/gruntjs/grunt-contrib-less#compress

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question