File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010 "test:coverage" : " NODE_ENV=test c8 mocha tests --test-reporter=spec" ,
1111 "test:coverage:ci" : " NODE_ENV=test c8 mocha tests --test-reporter=spec --timeout=20000" ,
1212 "build" : " npm run build:ts; npm run build:webpack" ,
13+ "setup" : " sh scripts/setup.sh" ,
1314 "deploy" : " bash scripts/deploy.sh" ,
1415 "build:ts" : " tsc" ,
1516 "build:webpack" : " webpack" ,
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+
3+ # This script sets up the hds-lib-js build environment
4+
5+ # working dir fix
6+ scriptsFolder=$( cd $( dirname " $0 " ) ; pwd)
7+ cd $scriptsFolder /..
8+
9+ # check for well known prereqs that might be missing
10+ hash git 2>& - || { echo >&2 " I require git." ; exit 1; }
11+ hash npm 2>& - || { echo >&2 " I require node and npm." ; exit 1; }
12+
13+ echo "
14+ Installing Node modules from 'package.json' if necessary...
15+ "
16+ npm install
17+
18+ if [ ! -d dist/.git ]
19+ then
20+ echo "
21+ Setting up 'dist' folder for publishing to GitHub pages...
22+ "
23+ rm -rf dist
24+ git clone -b gh-pages git@github.com:healthdatasafe/hds-lib-js.git dist
25+ fi
26+
27+ echo "
28+
29+
30+ If no errors were listed above, the setup is complete.
31+ See the README for more info on writing and publishing.
32+ "
You can’t perform that action at this time.
0 commit comments