The National Archives WordPress Parent Theme
Mobile first front-end framework http://getbootstrap.com/
Using Bootstrap Sass https://github.com/twbs/bootstrap-sass
Grunt as a task manager to aid development http://gruntjs.com/
WordPress breadcrumbs without a plugin https://gist.github.com/Dimox/5654092
Under the 'Hosts' tab create a new server with Server Name 'tna-base-dev' within the MAMP/htdocs/sites/tna-base-dev/ directory. Having done this click 'Save'.
Under the 'Hosts' tab, with 'tna-base-dev' selected, click Extras and install WordPress, providing:
Click 'Remote' in SourceTree and you will be shown a full list of repositories you have access to. Then:
Assuming that the Grunt CLI has been installed follow the instructions on the Grunt website.
There are several Grunt tasks available to developers. View the Gruntfile.js for a listing of included tasks
grunt
will run a predefined set of tasks and result in an ongoing 'watch' tasks which responds to any changes to JavaScript and SASS files by compiling, concatenating and minifying the output.grunt qunit
will run all QUnit testsNote: it is important to run Grunt before checking in code to ensure all JavaScript tests are passing.
Composer is used for dependency management, initially for PHPUnit but extending to other dependencies as needed.
To install Composer, from within the tna-base
directory open the Terminal and execute this command:
curl -sS https://getcomposer.org/installer | php
This downloads the Composer installer script with curl
and executes it with PHP, resulting in a composer.phar
file (the Composer binary) being placed in the current working directory.
Having done this follow these steps:
sudo mv composer.phar /usr/local/bin/composer
into the Terminal~/.bash_profile
file PATH=/usr/local/bin:$PATH
At this stage you should be able to execute the composer
command in the Terminal to see all the available options.
Having followed the steps above you will be able to install dependencies by typing composer install
at the Terminal.
Having followed the steps under 'Installing Composer' type vendor/bin/phpunit -c phpunit.xml
from within the tna-base
directory to run Unit Tests for the project.
Note: PhpStorm allows for PHPUnit integration - allowing your tests to be run automatically. Search the JetBrains website to find out how to configure this.
Any JavaScript written for this theme should be unit tested with QUnit. See the js/tests/example
directory for an example QUnit test and fixture.