Skip to content

Commit fa38493

Browse files
authored
Load NVM before switching node versions for codecombat (#120)
Also run all commands in the same shell instance so that we don't need to worry about losing the new node environment. To time the individual commands, just put `time` in front of each.
1 parent 66b7ad5 commit fa38493

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

examples/codecombat/config.js

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,23 @@ export default {
1616
fi
1717
rm -rf public
1818
`,
19-
'nvm install 5.10.1',
20-
// Some dependency issues make the install fail the first time, so just try again.
21-
'npm install || npm install',
22-
// node-sass doesn't get set up correctly for some reason, so set it up again.
23-
'npm install node-sass',
24-
'npm install request',
25-
'./node_modules/.bin/bower install',
26-
'./node_modules/.bin/webpack',
27-
'node index.js --unittest &',
2819
`
20+
source ~/nvm/nvm.sh
21+
nvm install 5.10.1
22+
# Some dependency issues make the install fail the first time, so just try again.
23+
time npm install || npm install
24+
# node-sass doesn't get set up correctly for some reason, so set it up again.
25+
time npm install node-sass
26+
time npm install request
27+
time ./node_modules/.bin/bower install
28+
time ./node_modules/.bin/webpack
29+
30+
node index.js --unittest &
2931
n=0
3032
until [ $n -ge 60 ]; do curl http://localhost:3000 && break; n=$[$n+1]; sleep 1; done
33+
time ./node_modules/karma/bin/karma start --browsers Firefox --single-run --reporters dots
34+
time npm run jasmine
3135
`,
32-
'./node_modules/karma/bin/karma start --browsers Firefox --single-run --reporters dots',
33-
'npm run jasmine',
3436
],
3537
expectConversionSuccess: true,
3638
expectTestSuccess: true,

0 commit comments

Comments
 (0)