In this recipe, we will learn how to compile LESS files to CSS files with a task runner named Grunt.
For this recipe, we will assume that you've already installed Visual Studio 2015 Community and that the installer automatically installed Node.js and npm.
After that, we will have to install all the modules we need to execute all the tasks we want to run.
We can use Grunt in two ways:
Without using Visual Studio, through the command line, using Command Prompt, Node.js, npm, and installing and using all the modules you need to execute all the tasks we want to run.
Installing Visual Studio 2015 Community Edition and the Visual Studio extensions that allow us to run these tasks in the Visual Studio user interface.
In this recipe, we will use Grunt in the second of these two ways, using Visual Studio to compile LESS files to CSS files:
- To install Grunt, let's open
package.json
, or if we begin from an empty project, just add apackage...