Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add watch script for auto recompile of Coffeescript #867

Closed
anth0d opened this issue Aug 18, 2017 · 1 comment · Fixed by #869
Closed

Add watch script for auto recompile of Coffeescript #867

anth0d opened this issue Aug 18, 2017 · 1 comment · Fixed by #869

Comments

@anth0d
Copy link

anth0d commented Aug 18, 2017

While hacking on Dredd I like to have a watch command auto-recompiling my Coffeescript into JS

I propose adding npm run watch which basically does a build (coffee ...) with the -w flag.

@honzajavorek
Copy link
Contributor

honzajavorek commented Aug 18, 2017

Thanks for the suggestion! Ideally, we wouldn't need this at all - see #705. However, if it helps you to hack on Dredd, then whatever works 👍 I tried it out and I think the command you want is

coffee -b -w -o lib/ src/

Usually, it's possible to add extra params to npm scripts, like this:

npm run test -- -b

That would run underlying mocha with the -b parameter. However, this isn't possible in this case, since we need to change the parameters. Adding doesn't work, I tried. So the only solution to this would be adding an extra script. I suggest build:watch to keep it in line with the other names, it would be a special version of the build command. What do you think?

@michalholasek What do you think? Would this help you to deal with CS as well?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants