matejlatin / Gutenberg

A meaningful web typography starter kit.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Grunt ignores scss files in folders in src/style

matejlatin opened this issue · comments

I tried updating the _text.scss file in the src/style/modules folder but grunt doesn't acknowledge the change in the file and nothing happens when the watch task is running.

If I make a change to the _gutenberg-config.scss file which is in the src/style folder the watch task works.

I noticed this shortly after the change of the project folder structure but forgot about it.

Need to fix this part in gruntfile.js somehow:

files: [{
          expand: true,
          cwd: 'src/style/',
          src: ['**/*.scss'],
          dest: 'src/style/',
          ext: '.css'
        }]

On another look I think this is the problematic part (watch task):

      scss: {
        files: ['src/style/*.scss'],
        tasks: ['sass', 'concat:css', 'cssmin', 'compress:css'],
        options: {
          livereload: true,
        }

Should probably be:
files: ['**/*.scss']

I did have to change the files line in the watch task. Grunt now runs the tasks on changes to any of the .scss files.

Correct me if I'm wrong: if I change the _gutenberg-config.scss file, the grunt task sass should regenerate the assets/*css files?

It does not; I have to manually run sass.

@bdarcus the watch task which is the default task will do that. You just need to run grunt and all the changes will be applied as soon as you save your files.

No, the "watch" task runs the "sass" task whenever there's a change to a sass file. Then it will also run 3 css tasks. All "watch" task does is run other tasks...