Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Please add 'watch' option to Javascript options object to make watcher work running in nodejs too #2707

Closed
Friksel opened this issue Jul 9, 2019 · 3 comments

Comments

@Friksel
Copy link

Friksel commented Jul 9, 2019

It's great to have a watcher feature on the terminal command, but I also like to use it when using node-sass inside node. Not sure why it's not already there, but a property for node-sass running in javascript to set watch to true would be very welcome!

@Friksel Friksel changed the title Please add 'watch' option to Javascript object Please add 'watch' option to Javascript options object to make watcher work running in nodejs too Jul 9, 2019
@saper
Copy link
Member

saper commented Oct 17, 2019

Watching adds additional complexity that could not possibly be squeezed into the render() function.

Feel free to build an own module based on

function watch(options, emitter) {
and https://github.com/sass/node-sass/blob/e3ab6e18c54a1cf2f1954508942188038a4f19a1/lib/watcher.js

Such a module could be a great contribution to making CLI a separate module altogether #1156

@xzyfer
Copy link
Contributor

xzyfer commented Oct 17, 2019 via email

@saper
Copy link
Member

saper commented Oct 17, 2019

This is actually duplicate of the issue #1056

We have so many issues around watching feature - maybe this should become a separate project altogether...

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

No branches or pull requests

3 participants