jkroso / atom-browser-refresh-on-save

A plugin for Atom which reloads assets in the browser as soon as you save them
7 stars 3 forks source link

Adding optional delay #5

Closed markoradak closed 8 years ago

markoradak commented 8 years ago

First off - it's quite crazy how this completely suit my needs (in terms of supported languages, browsers etc) - almost as if I built it myself :smile:

Now, considering that you've added stylus to the list, I don't know if there is an issue on my part (though it doesn't look like it), but after saving stylus file, it sends browser command too quickly, before compile finishes. Same thing happens with JavaScript compiled by webpack.

The easiest way to fix it is to add an option for a delay. I've tried it out quickly, and it solves it - but the delay duration has to be optional (as project grows, so does the compile time).

In a perfect world, it would be even better if you could set it to run after compile, though I don't think that's an option, is it..?

I'd be happy to do a PR with proposed changes (in terms of adding delay), if you're up for it :)

jkroso commented 8 years ago

I think it's better to always use a server when you have computer generated code. That way you always get the minimum amount of delay.