mir
mir

Reputation: 13

Grunt watch says 'waiting' not watching

so I am trying to get grunt working ( ive installed the relevant elements ) I'm not sure what settings i have wrong as, this is what comes up in the terminal after 'grunt watch'

$ grunt watch
Running "watch" task
Waiting...

it won't do anything until i hit save. then it will say a change has taken place.

i dont think this is how it's supposed to work.

my gruntfile is:

// Use "grunt --help" to list the available tasks



module.exports = function(grunt) {

    grunt.initConfig({

        sass: {

            // this is the "dev" Sass config used with "grunt watch" command

            dev: {

                options: {

                    style: 'expanded',

                },

                files: {

                    // the first path is the output and the second is the input

                    'style.css': 'sass/style.scss',
                    'style_products.css': 'sass/style_products.scss',
                    'style-mega-menu.css': 'sass/style-mega-menu.scss'

                }

            },

            // this is the "production" Sass config used with the "grunt default" command

            dist: {

                options: {

                    style: 'compressed',

                },

                files: {

                    'style.css': 'sass/style.scss',
                    'style_products.css': 'sass/style_products.scss',
                    'style-mega-menu.css': 'sass/style-mega-menu.scss'

                }

            }

        },

        // configure the "grunt watch" task

        watch: {

            sass: {

                files: ['sass/*.scss', 'sass/**/*.scss',],

                tasks: ['sass:dev']

            }

        }

    });

    grunt.loadNpmTasks('grunt-contrib-sass');

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

    // "grunt" is the same as running "grunt sass:dist".

    grunt.registerTask('default', ['sass:dist']);

    grunt.registerTask('dev', ['sass:dev']);
    grunt.registerTask('default', ['watch',]);
    

};

can anyone pls help?

Upvotes: 0

Views: 101

Answers (0)

Related Questions