Learn how to use Awesome's included npm scripts to automate your time-consuming tasks in your development workflow with Gulp toolkit.
If you do not have Node installed already, you can get it by downloading the package installer from Node's website. Please download the stable version of Node.js (LTS) NOT the latest.
You need to have Node.js (Node) installed onto your computer before you can install Gulp. When you're done with installing Node, you can install Gulp by using the following command in the command line:
Please note, first Gulp should be installed globally and for that reason
-g command is used.
npm install gulp-cli -g
If you are using MacOS please use
sudo keyword in the command because they need administrator rights to install Gulp globally.
Installing NPM modules
First, change the command line path into your project where Awesome folder is located. if you have not done this before, you may check the following article to quick start Command Prompt - How to use the simple, basic commands.
Once the path of your workflow is changed to Awesome folder, you may run
package.json file by using the following command:
This time, we're installing Gulp with its all dependency plugins like
gulp-autoprefixer and etc. It might take a couple of minutes depends on your internet connection.
If you check the project folder when the command has finished executing, you should see that Gulp has created a
Now we have an integrated workflow. To try it out run:
Now you can try making some changes to
assets/include/scss/theme.scss and save it.
gulp dist to minify CSS, merge JS files into one file, compress images size and also updates the npm libraries to their available latest npm version.
All npm libraries that are used in the Awesome template can be seen in the
Awesome uses Autoprefixer (included in our build process) to automatically add vendor prefixes to some CSS properties at build time. Doing so saves us time and code by allowing us to write key parts of our CSS a single time while eliminating the need for vendor mixins.