forked from highlightjs/highlight.js
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
35 lines (31 loc) · 995 Bytes
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
language: node_js
node_js:
- "lts/*"
- "node"
env:
# we current only test "use strict" for our NPM builds
- BUILD=node TEST_STRICT_BUNDLE=1
- BUILD=browser
- BUILD=browser NO_MINIFY=1
script:
- |
export BUILD_PARAMS="-t $BUILD"
if [ "x$NO_MINIFY" = "x1" ]; then
export BUILD_PARAMS="$BUILD_PARAMS -n"
fi
node tools/build.js $BUILD_PARAMS
# test that our build is "use strict" safe for use with packaging
# systems importing our source thru ES6 modules (rollup, etc.)
if [ "x$TEST_STRICT_BUNDLE" = "x1" ]; then
./node_modules/.bin/rollup -c test/builds/rollup_import_via_commonjs.js
node build/bundle.js || exit 1
rm build/bundle.js
fi
if [ "x$BUILD" = "xnode" ]; then
npm run test
else
npm run test-browser || exit 1
# our browser build should also work fine as a Node.js CommonJS module
node test/builds/browser_build_as_commonjs.js
fi
sudo: false # Use container-based architecture