Remember if you’re reporting an issue, please include your Gruntfile and any messages displayed by Grunt or the grunt2gulp program such as an error or stack trace. This makes it much faster for me to track down the issue and to test it with grunt2gulp and Grunt.
However, grunt2gulp.js is starting to get…hairy. It’s about 400 lines (or more?) now and it’s time to split things up into separate files at the least.
I created a new branch called zesty-coffee and it’ll be using CoffeeScript. I’m using the npm preinstall script to compile the files into the bin/ script. Next step is making sure the conversion is complete and works correctly and after that I’m going to create a Gruntfile.js for linting the generated grunt2gulp.js file and for generating the JSDocs from it. After that we’ll have a good working example of a Gruntfile that can be converted to gulp within the repo so it’s easier to dog-food grunt2gulp.
There’s a new task runner around, Gulp.js, and it’s supposedly very good (haven’t had a chance to try it yet) but there are still many projects using Grunt. If you want to try out Gulp on an existing Grunt-based project, it can be tedious to start rewriting things because Gulp is imperative and based on the idea of streams while Grunt is more declarative.
What I like about gulp from what I saw is that it’s a wrapper around orchestrator and vinyl-fs and it’s straight-forward. Grunt is monolithic from what I’ve seen and I think moving to Gulp will be a good move over the long-term. However, I think there is still a place for a declarative sort of task configuration file.
2017 Update: grunt2gulp is still being used but it seems now that people are moving from Grunt and Gulp to webpack (or SystemJS or Rollup.js). Gulp is still a very cool build tool to use and I recommend that people move away from Grunt as soon as possible on to more modern tools like Gulp and Webpack and Rollup.js.
I found some code for express livereload and for assets that change but I didn’t find anything that was good for restarting the Express webserver whenever a web server file changed. I’m very used to Django’s workflow where you can leave the dev web server running and it will reload whenever you change a Python file. Continue reading “Restarting an Express web server using grunt-contrib-watch”