Create story packages. Heavily inspired by facia-tool
Install each of the things listed:
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)"
Ubuntu:
sudo apt-get install openjdk-8-jdk
Mac: Install from Oracle web site
Ubuntu:
sudo apt-get install nodejs
sudo apt-get install npm
sudo ln -s /usr/bin/nodejs /usr/bin/node
Mac:
brew install node
Ubuntu/Mac:
sudo npm -g install grunt-cli
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.
Mac:
brew install nginx
Mac:
brew install sbt
pip install awscli
You will need the following credentials:
- cmsFronts - developer
- workflow - S3 Read
- capi - API Gateway invocation
./setup.sh
This will fetch the required config files, set the nginx mappings, and install the Javascript dependencies.
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 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!