segmentio / myth

A CSS preprocessor that acts like a polyfill for future versions of the spec.
4.33k stars 131 forks source link

Watch @import files #128

Open gr0uch opened 9 years ago

gr0uch commented 9 years ago

Currently, the --watch option watches only the specified file even if there are @import statements in the file. Should it also watch files that are included via @import? I'd be interested in this feature and could put together a pull request if needed.

Siilwyn commented 9 years ago

Currently you can get this working with a watcher to run myth whenever a CSS file other than the one myth outputs changes. It would be nice if myth supports this though I think the whole --watch option isn't really needed, it's better to do one thing well and let the watching be done by a separate module.

MoOx commented 9 years ago

FYI, cssnext --watch handle imports the right way ;)

Siilwyn commented 9 years ago

@MoOx thanks for pointing that out, it looks like it handles a lot of things in a better way. I switched.

ianstormtaylor commented 9 years ago

@0x8890 good call, would love a PR for this!