Skip to content

Latest commit

 

History

History
147 lines (103 loc) · 2.84 KB

README.md

File metadata and controls

147 lines (103 loc) · 2.84 KB

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 8

Ubuntu:

sudo apt-get install openjdk-8-jdk

Mac: 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 jspm@0.16.55
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

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

sbt

Wait for SBT to be up and running. This may take a while the first time, you'll know it's done when you get a prompt.

If it is your first time, compile the project.

compile

Then run the project locally by typing

run

This also can take a while the first time.

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!