# Task Runners (Grunt)

Similarly to how [Composer](/key-concepts-and-dev-tools/dependency-management-composer.md) 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](/key-concepts-and-dev-tools/typescript-and-sass.md) 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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://framework.deep-web-solutions.com/key-concepts-and-dev-tools/task-runners-grunt.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
