Working with assets file

Update at 2017-12-22 09:10:50


CI Base uses gulp to compile or bounce asset files like css, js. This feature is considered as an advanced feature when developing a project, which means it is not really needed or you can search for another alternative.

Before reading this article, please make sure you already know about scssnpmgulp. If you do not know, you can find out


Make sure you have installed npm, to test you run run open terminal or cmd up and run command

npm -v

If the version of the npm appears, it means that you have installed, and an error message is displayed, which means that you have not installed or installed it.

At the root of the application, run the following command to download the necessary installation packages

npm install

Running the command may take a few minutes to download a significant number of libraries

Working with assets file

CI Base uses gulp to compile scss into css, you can see the configuration information at the /gulpfile.js file.

The scripts support working with sass include

  • gulp sass: Compile css form sass file
  • gulp watch: Compliant assets file when them change
  • gulp build: Build assets, minify