rca-wagtail-2019

Front end tooling

This set of tooling should form the basis for any new wagtail projects. It can also be used for custom django builds - simply copy the static_src directory from here to your build.

What’s required

You can run the tooling within the VM where Node.js is pre-installed, but if you are using Mac OS, you will likely have issues with performance of npm install and other npm commands. It is adviced to Mac OS users to have node on the host machine. To install node on the host machine we recommend using nvm. Once you have nvm installed simply run nvm install to install and activate the version of node required for the project. Refer to the nvm documentation for more details about available commands.

What’s included

Developing with it

Using npm

Tests

JavaScript unit tests for this project use Jest. Here are commands you can use:

# Run the whole test suite once.
npm run test
# Run the whole test suite, collecting test coverage information.
npm run test:coverage
# Start Jest in watch mode, to run tests on a subset of the files.
npm run test:watch

Deploying it

Build scripts

To only build assets for either development or production you can use

Debug script

To test production, minified and vendor prefixed assets you can use