Thursday 16 November 2017

Clean node module cache and re-require?

I have a node module that automates certain build processes and instantiates some classes. I want to hook this up with a gulp.watch, but it only builds the first time. I'm assuming this is because of the way my build system caches changes, and it isn't re-instantiating the classes. Running it fresh works every time.Is there a standard way of dealing with this? Is there some kind of design paradigm I can use to avoid this situation, or am I going to have to do some trickery with the cache?

Submitted November 16, 2017 at 09:35PM by topherlicious

No comments:

Post a Comment