Awesome
Co-op Experience Library
Guidelines, tools and resources to help us create better digital experiences.
The Experience Library is for anyone working on products, services and communications at Co-op.
Prerequisites
You'll need Node.js, NPM and Ruby with the gem dependencies installed. When you run the next step these will be installed autoamtically, however on Co-op Macs you may not have permissions to do this.
If you get an error:
- Log out.
- Log back in as the admin account.
- Choose Apple menu > System Preferences.
- Click Users & Groups.
- Click the lock icon to unlock it, then enter an administrator name and password.
- Select a standard user or managed user in the list of users, then select “Allow user to administer this computer.”
- Log out of the admin account.
- Log back in with your standard account.
Local development
This project uses Jekyll to generate pages, and various NPM packages with Gulp to compile the assets into the build
directory. To install all the necessary dependencies:
bundle install
npm ci
Once dependencies have been installed, you can build and serve your prototype locally. Gulp commands are already set up to generate the Jekyll build, lint and compile the postCSS and JavaScript, to copy over necessary assets from the Toolkit, and to run a local server for development.
The default gulp task will build and compile all the assets, start a local server, and watch for file changes:
npm run server
A local version of the website will now be accessible at http://0.0.0.0:9000.
Note: for the browser to reload automatically when a file changes, you will need to install the LiveReload extension.
Deploying the website
Changes to the main branch are automatically deplyed to development.static.coop.co.uk using Github actions. To go to development you need to be on the Co-op VPN.
To trigger a deploy to production. Go to:
- 'Actions'
- Select 'Build and Deploy to production'
- Select the 'run workflow' dropdown
- Make sure 'Branch: Main' is select
- Press 'Run workflow'