Frontend Tools

Install

Install the tools described in this section:

npm install

Serve

Serve Redaxscript using the internal PHP server:

grunt serve

Install the LiveReload module to enable live reload in your browser:

php console.php install module --alias=LiveReload

Browse your working copy:

http://localhost:8000

Lint

Validate your CSS code for consistence:

grunt stylelint
grunt colorguard

Validate your JavaScript code for consistence:

grunt jscs
grunt jshint

Validate your HTML code for consistence:

grunt ncsslint
grunt htmlhint

Build

Build styles, scripts and fonts at once:

grunt build

Build the styles:

grunt build-styles

Build the scripts:

grunt build-scripts

Build the fonts:

grunt build-fonts

Optimize

Create table of contents for your assets and optimize images:

grunt optimize
Edit on GitHub