To run the website on a docker, run the following command from within the directory:
docker-compose up
Wordpress should be available on port 80 and phpmyadmin on port 8080.
Front end source files are stored inside the /website-content/themes/jsarc/src
folder.
Gulp is a required dependency for editing the jsarc theme front end.
https://gulpjs.com/ The JS task runner gulp is used to build the front end dependencies for the JSARC wordpress theme.
Install gulp by running npm install -g gulp
, then install gulp-cli with npm install -g gulp-cli@2.0.1
If you already have gulp installed on your machine, you can check your local gulp version by running
$ gulp -v
in your terminal.
You should see something similar to the output below after running the command above.
CLI version 2.0.1
Local version 4.0.0
If you have a different version of the CLI to the above you may need to install CLI version 2.0.1
by running npm install -g gulp-cli@2.0.1
In terminal, cd into the /website-content/themes/jsarc/src
folder and run $ npm install
to install
the remaining dependencies required to build the JSARC theme front end.
(watches static files for changes and livereloads)
Run $ gulp
inside the themes/jsarc/src/
folder.
Run $ gulp sassCompile
to compile SASS into the style.css file used by the jsarc theme.
Run $ npm stylelint
to lint css with stylelint.
To test pages for accessibility and common web performance issues with the webhint.io checker run
$ npm run hint yourURL
Where 'yourURL' is a url to a page you want to test. For example, 'npm run hint localhost:3000/homepage-test'.
To push a new build to production use:
drone --server https://drone.acp.homeoffice.gov.uk/ --token <token> deploy UKHomeOffice/jsarc-wordpress-theme <build number> prod