Gulp.js is a toolkit to automate & enhance your workflow.
In this project, I've made a small gulp task to convert the scss files to css files.
Open and view the Project using the .zip
file provided or at my Github Repository
You would require the following tools:
-
Open CMD and run the following command to globally install gulp:
npm install gulp-cli -g
-
Change directory to your project folder and run the following command to initialise a new node project
npm init
-
Run the following command to install gulp locally in this project
npm install gulp -D
-
Run the following command to create a gulpfile for the project
touch gulpfile.js
NOTE:
touch
works only for MAC OS, but a work-around for this is running the command inGit-Bash
on a windows system or alternatively use the following commnand:type NUL > gulpfile.js
-
Install different npm packages that are available for gulp as per your requirement. For example:
npm install gulp-sass --save-dev
-
Require them in the
gulpfile.js
and start creating tasks using them.
- To run the task that you've created, use the following command:
Replace
gulp <task-name>
<task-name>
with the name of your task