Gulp

Learn how to use the npm scripts included with Spyre to build documentation, compile source code, and more.

Requirements

In order to use Gulp you will need to download Node JS. If you do not have Node installed already you can get it by downloading the package installer from the official website. Please download the stable version of Node.js (LTS).

Download Node JS

Install

After Node is installed on your system you can proceed to Gulp installation. Simply run the command below in your terminal which will install Gulp globally. You can now cd to you project's folder where Spyre is installed.

npm install gulp-cli -g

Once the path of your workflow is changed to your project's folder, where Spyre is installed, install all of the packages needed in order for Gulp to run correctly:

npm install

Everything is now installed and ready to go!

Running Gulp

For development we set a Gulp command that will compile the sources to dist then start a local Browsersync instance on port 3000 to serve and auto-refresh your pages as you edit.

gulp

For production we set a Gulp command that will compile and minify the CSS and JS files ready to be included in your project in the dist folder.

gulp build

Build

After running gulp build make sure you use the minified version of css and js theme files in your final html files