danielhusar / grunt-pleeease

Grunt plugin for postprocess CSS with ease.
MIT License
23 stars 2 forks source link

watcher? #7

Closed bpongy closed 9 years ago

bpongy commented 9 years ago

Hi, Is it possible to have an example with a watcher? For example it's really hard to write a Gruntfile with compass & watch. I tried to make something and I have this sort of message:

Running "watch" task
Waiting...
Verifying property watch.pleeease.files exists in config...ERROR
>> Unable to process task.
Warning: Required config property "watch.pleeease.files" missing.

Thanx for your help.

danielhusar commented 9 years ago

Hey,

are you using grunt-contrib-watch ? Because this should work out of the box.

Something like this should work.

watch: {
  scripts: {
    files: '**/*.css',
    tasks: ['pleeease'],
    options: {
      interrupt: true,
    },
  },
},
bpongy commented 9 years ago

Hi Daniel, thanx a lot for your quick answer. It works!!

Just one note, In the Gruntfile.js we can write:

        pleeease: {
            custom: {
                options: {
                    config: '.pleeeaserc'
                },
                /* ... */
            }
        }

I think you have to put it in the doc. Thanx again!

danielhusar commented 9 years ago

Hi,

yep good idea, I will add it, thanks.