Build your own

This page shows you how to customize afterglow and create your own build.

afterglow is open source, that means you can download the raw sources and do with it whatever you want to. Here's a short step by step introduction how to do so.

Step 1 - download the repo

You'll find the repo on github. Go ahead and download the entire repo.

There are lot's of files contained, most of them will be included in every build. The raw development versions are located in the src folder. You'll easily find afterglow's main file afterglow.js there, the rest of the folder structure should be self explaining.

If you want to test the raw version of afterglow for development purposes, there is a sandbox folder holding some files. The index.html puts the whole thing together using the raw files while the releasetest.html uses the compiled version (which is placed in the dist folder when compiling). You will probably have to upload all the stuff somewhere in order to make the Javascript work properly.

Step 2 - Install npm

afterglow is built using gulp which requires npm to be installed on your machine. There is a short post from the npm-team which explains npm installation here.

Step 3 - install dependencies

When npm is running on you system, you will have to install the dependencies that are needed for the building process.

To do so, navigate to the repo folder and run this command in your terminal/command line:

npm install

This will install some dependencies and allow you to compile afterglow.

Step 4 - compile afterglow

After having made your changes you probably want to compile the whole thing. With the dependencies installed, thats rather easy.

Navigate to your repo folder and run this command in your terminal/command line:

gulp build

This will compile afterglow's final file named afterglow.min.js and place it in the dist folder.

Need help?

If you get stuck or need help on something, just ask for it in the forums. :-)


Did this page help you?