Create a new template file and eventually compress it using Pistachio. Follow the given steps:
Open your command-line tool and move to the folders containing the template files.
Type the
pistachio
command and specify the name of the output file and the file to compile:$ pistachio --out=splash-tpl.js splash-tpl.html
Create a build file named, for instance,
template-build.js
, for the existing template to use when compressing the file with UglifyJS2, specifying the template name and the desired output filename:({ name: ‘splash-tpl', out: ‘splash-built.js' })
Run the r.js Node module from the command-line tool:
$ r.js -o template-build.js