Installing Node.js
First, you must download and install node.js. NPM stands for Node Packaged Modules and is a way to manage development dependencies through Node.js.
Download the Node.js source code or a pre-built installer for your platform, and start developing, you can download it from nodejs.org
You can check it in your terminal window using
these commands node --version
and
npm --version
.
Installing Gulp
GulpJS is a JavaScipt task runner. In one word: automation. The less work you have to do when performing repetitive tasks like minification, compilation, unit testing, linting, etc.
Apex Build System uses the gulp task to generate the different templates.
From the command line:
-
Install gulp globally with
npm install gulp-cli -g
-
To install node packages, navigate to
apex-admin-template/
directory. Then runnpm install
. NPM uses thepackage.json
file and automatically install the required local dependencies listed in it.
Gulp Commands
gulpfile.js
file contains all the
predefined task. The table given below contains
all the gulp tasks and usages.
You can modify or add task in
gulpfile.js
file.
Command | Description |
---|---|
gulp dist-clean |
Clean js and css folders from app-assets. |
gulp dist-js |
Clean js folder from app-assets, copy js files from src folder and minify them in app-assets/js. |
gulp sass-compile |
Compile core, main(app), pages and plugins scss files. |
gulp dist-css |
Clean css folder, compile all scss files, auto prefix them, organize them and finally minify them in app-assets/css folder. |
gulp dist |
Generate css and js files in app-assets folder. |
gulp monitor |
Watch all scss and compile it accordingly. In this command you need to pass the Layout, LayoutName & TextDirection. |