How does grunt task runner works?
What are some use cases for it?
If you want to teach someone on using the task runner, how'd you ask them to use it?
How does grunt task runner works?
What are some use cases for it?
If you want to teach someone on using the task runner, how'd you ask them to use it?
For further actions, you may consider blocking this person and/or reporting abuse
This post blew up on DEV in 2020:
As JavaScript devs, we usually don't have to deal with compilers ourselves. However, it's definitely good to know the basics of the JavaScript engine and see how it handles our human-friendly JS code, and turns it into something machines understand! 🥳
Happy coding!
Dev Doido -
Tapajyoti Bose -
Adam Nathaniel Davis -
Ezile Mdodana -
Once suspended, maheshkay will not be able to comment or publish posts until their suspension is removed.
Once unsuspended, maheshkay will be able to comment and publish posts again.
Once unpublished, all posts by maheshkay will become hidden and only accessible to themselves.
If maheshkay is not suspended, they can still re-publish their posts from their dashboard.
Once unpublished, this post will become invisible to the public and only accessible to Mahesh K.
They can still re-publish the post if they are not suspended.
Thanks for keeping DEV Community safe. Here is what you can do to flag maheshkay:
Unflagging maheshkay will restore default visibility to their posts.
Top comments (1)
I haven't really worked with grunt, but I have worked with Gulp. Similar just kind of different syntax.
Most Task Runners just essentially run tasks (Duh). Most of them use Node.js apps to do repetitive functions.
Biggest use case for me is compiling SCSS down to just CSS.
This function defines the gulp task that compiles and minifies the sass while adding source maps so you can track down errors and changes back to the split SCSS files.
So in the console you would just run
and it would find all the sass files, source map them, minify them, auto prefix the css, and then update browserSync (live reloads the page on file/css update).
Obviously it's not that useful to have to run the
gulp sass
command every time you need to compile SCSS. Luckily you can add watch functions:and this will run and watch all the files defined and then run the
gulp sass
task automatically when one of those files changes.You can also use task runners for bundling projects, linting your js, and about a million other things.