Skip to content

guardian/story-packages

Repository files navigation

Story Packages

Create story packages. Heavily inspired by facia-tool

New developers quick-start

  1. Application dependencies
  2. Run the App
  3. Unit tests

Application dependencies

Install each of the things listed:

Git

Mac:

brew install git
echo 'export PATH="/usr/local/bin:$PATH"' >> ~/.bash_profile

This is needed on Mac only:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

JDK

See .tool-versions

Ubuntu:

sudo apt-get install openjdk-8-jdk

Mac: Use sdkman or install from Oracle web site

Node.JS

Ubuntu:

sudo apt-get install nodejs
sudo apt-get install npm
sudo ln -s /usr/bin/nodejs /usr/bin/node

Mac:

brew install node

Grunt (build tool)

Ubuntu/Mac:

sudo npm -g install grunt-cli

JSPM (package management)

Ubuntu/Mac:

npm -g install [email protected]
jspm registry config github

It'll ask for a GitHub access token. Go to GitHub Settings -> Applications and generate new token. Ensure only the public_repo scope is checked.

nginx

Mac:

brew install nginx

dev-nginx

sbt

Mac:

brew install sbt

aws cli

pip install awscli

Run the App

You will need the following credentials:

  • cmsFronts - developer
  • workflow - S3 Read
  • capi - API Gateway invocation

1. Run the setup script

./setup.sh

This will fetch the required config files, set the nginx mappings, and install the Javascript dependencies.

2. Run the application

./scripts/start.sh

Now check that you are up and running by hitting the following URL

https://packages.local.dev-gutools.co.uk

Unit tests

Unit tests run with grunt, karma and jasmine.

grunt test

Runs the tests once in PhantomJS and exits with an error if tests fails

grunt test --no-single-run

Starts karma in debug mode, you can connect your browser at http://localhost:9876?debug.html

You can run a single test going to http://localhost:9876/debug.html?test=collections, spec files are inside public/test/spec.

You need to have version node version 4.1 or higher installed to be able to run the tests.

Enjoy!

About

Story packages editor

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 27