Skip to main content

Posts

Showing posts from February, 2018

A simple recipe to use grunt watch to setup simple autorun workflow while developing any type of project

It is great to have a tool that watches changes and reruns code (like tests or server code etc) as you are saving your files. This idea here of course works great with any Node project but hey, even if you are not coding in Node (or even in language other than JS), you can still use this idea, it's very generic and will work for just about any type of project if you just set this basic setup once. While there are many approaches to doing this depending on the project type (like webpack's watch which is super-powerful for web projects, nodemon  for server restart cases, chokidar etc), my current favorite for a generic  method that will work with any type of project is based on grunt-watch. So read on! I setup this simple repository with a simple readme guide on how to do this. https://github.com/binodpanta/node-examples/tree/master/gruntwatch I think it will save you a lot of time when working on NodeJS projects. Even if you don't use Grunt for your actual develop