When comparing Grunt vs Fly, the Slant community recommends Grunt for most people. In the question“What are the best Node.js build systems / task runners?” Grunt is ranked 6th while Fly is ranked 13th. The most important reason people chose Grunt is:
Grunt emphasizes configuration over code. As such grunt configurations are easy to write. Writing them does not require knowledge of streams, promises, concurrency, or asynchronous tasks to set up.
Specs
Ranked in these QuestionsQuestion Ranking
Pros
Pro Configurations are easy to write
Grunt emphasizes configuration over code. As such grunt configurations are easy to write. Writing them does not require knowledge of streams, promises, concurrency, or asynchronous tasks to set up.
Pro Has tons of plugins
Grunt has been available for a long time and during this time it has garnered a large community of dedicated developers who have made more than 4000 grunt plugins available to be used.
Pro Plugins configured out of the box
The default behaviors for most plugins is normally what you want, so if you just use a plugin without configuring it, it will work for most use cases.
Pro A GUI front-end via spock
A graphical user interface for grunt is available via spock.
Pro Choice of using it as a config file or writing your own functions
You can use Grunt as a config file or JavaScript by writing your functions via Node Modules.
Pro Grunt v1.0 alpha uses Orchestrator for maximum concurrency
Grunt version 1 alpha, aka grunt-next, the upcoming next major release of Grunt, uses Orchestrator to sequence and execute tasks and dependencies with maximum concurrency, potentially bringing it up to speed with Gulp in term of performance.
Pro An API that makes writing and using of plugins extremely easy
The API is built in such a way that if you write a Grunt task that is useful for someone else out there or would be useful for future projects, it can be easily made into a grunt plugin and then shared using npm.
Pro Shell commands inside Grunt
There is a Grunt plugin called grunt-exec which allows developers to execute shell commands inside their Grunt files. This is extremely easy if a developer is developing only in Node and constantly getting out of Node environment to run something like a git command can become frustrating.
Pro Takes advantage of ES6 features
Fly is written to use new ES6 features like generators and promises.
Pro Support for concurrent tasks
Fly supports parallel processing and concurrent tasks via Fly.prototype.start([tasks], { parallel: true })
Pro Smaller build files, with same benefits of a huge one
If it's a fly-
plugin you don't have to require it like you do with every other build tool. Theres no need for wrapper functions for each plugin (aka .pipe()
). If it's a fly-
plugin you just call it directly. The build file get's to the point quickly without adding all the extra fluff. This makes your build file very clean and easy to read!
Pro Very easy to setup
Fly is easy to setup, there are no caveats that you have to know since everything is very intuitive. Also with fly you don't have to repeat your self several times. You just define out what you want and that's it. If it's a fly plugin it will be required automatically without the need for an additional plugin.
Pro Fly plugins are required automatically
If you want to use a Fly plugin in a flyfile, it's automatically required
without needing an additional plugin.
Pro Can run subtasks inside a task
Fly supports running multiple subtasks in a single task without having to create a new one.
Cons
Con Grunt compatibility issues
Changes in different versions in grunt are not always backwards-compatible.
Con Large bloated configuration files
To configure Grunt, developers need to basically write large files and configure JSON objects. While it's very powerful, the sheer complexity of it's configuration file may be a large obstacle for newcomers and developers that have not used any automation tools before. This may push them to search for simpler alternatives.
Con Grunt lost mindshare in general
Grunt can only do what the individual plugins allow it to do. New tools aren't always being made available for Grunt, nor are they always being updated as quickly, so you're stuck with an aging ecosystem.
Con The need to track creation/movement of files
Debugging and augmenting grunt pipelines are much harder than other build systems that clearly show the pipelines in the code.
Grunt works on files so you must track where each task puts files and try and intercept that in a task if you want to add something in the middle of a build pipeline.
Con Limited number of plugins
There's still a very limited number of Fly plugins. This can contribute negatively in development time and energies spent to make a plugin to complete a task for which there's none yet.