Developers

Build Tools

Commentics uses Gulp as a build tool to do various tasks such as preprocessing Sass and minifying JavaScript.

After installing Gulp and changing directory to the same directory as the gulpfile.js file, you can run any of the following commands.

gulp js

Running this command will minify and concatenate the JavaScript files for the frontend. The JavaScript files for the 'backend' and 'install' folders can stay as they are.

gulp sass

Running this command will preprocess the Sass files for the 'backend', 'frontend' and 'install'. If you prefer you can run them individually using 'gulp sass-backend', 'gulp sass-frontend' or 'gulp sass-install'. There's never a need to add any vendor prefixes to the Sass files; these are handled automatically by an autoprefixer which covers the last two browser versions.

gulp lint

Running this command will check the standard of the Sass files to make sure for example that the properties are in alphabetical order, they're indented properly and are as effiecient as possible. Similarly to above, you can run them individually by appending '-backend', '-frontend' or '-install'.

gulp watch

Running this command will automatically preprocess the Sass files whenever it detects that you've edited them. This saves you having to run 'gulp sass' every time.