# Task Runners (Grunt)

Similarly to how [Composer](dependency-management-composer) supports [scripts](https://getcomposer.org/doc/articles/scripts.md) to create shortcuts or outright automations for different tasks, something similar can be done within the [npm ecosystem](https://www.npmjs.com/). Specifically, we are talking about task runners like [Grunt ](https://gruntjs.com/)and [Gulp](https://gulpjs.com/).

The DWS WP Framework uses Grunt to automate certain tasks. For example, some modules [use Grunt tasks](https://github.com/deep-web-solutions/wordpress-framework-bootstrapper/blob/master/Gruntfile.js) to automatically generate the POT file by scanning the code for translatable strings.

The example plugin [has Grunt tasks](https://github.com/deep-web-solutions/wordpress-plugins-utility/blob/master/Gruntfile.js) pre-written for compiling [TypeScript and Sass](typescript-and-sass) assets and performing other post-optimizations to the compiled files. All of this is powered by [npm packages](https://www.npmjs.com/) listed in [the `packages.json` file](https://github.com/deep-web-solutions/wordpress-plugins-utility/blob/master/package.json) together with the configuration written in the project's [Gruntfile](https://github.com/deep-web-solutions/wordpress-plugins-utility/blob/master/Gruntfile.js).

Most of these tasks can also be handled by Composer scripts, but npm provides some easy-to-use packages that were built out for these tasks. It just makes more sense to use JavaScript instead of PHP.

The purpose of this documentation is **not** to teach you how to use task runners, but we strongly encourage you learn how to use them. It's pretty simple really and they can automate some pretty difficult tasks.
