Skip to content

Commit da09ffb

Browse files
wardpeetpaulirish
authored andcommitted
Cleanup harmony scripts #513 (#516)
1 parent eaede96 commit da09ffb

File tree

4 files changed

+8
-19
lines changed

4 files changed

+8
-19
lines changed

.travis.yml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,8 @@ language: node_js
22
matrix:
33
include:
44
- node_js: "4.3.2"
5-
env:
6-
- UNIT=unit:harmony COVERALLS=coveralls:harmony
75
- node_js: "5.0"
8-
env:
9-
- UNIT=unit COVERALLS=coveralls
106
- node_js: "node"
11-
env:
12-
- UNIT=unit COVERALLS=coveralls
137
sudo: required
148
dist: trusty
159
cache:
@@ -25,10 +19,11 @@ before_script:
2519
- start-stop-daemon --start --background --exec $(pwd)/lighthouse-core/scripts/launch-chrome.sh
2620
- sleep 5
2721
script:
22+
- if [[ $(node -v) =~ ^v4.* ]]; then export __node_harmony=--harmony; fi
2823
- npm run lint
29-
- npm run $UNIT
24+
- npm run unit
3025
- npm run closure
31-
- npm run $COVERALLS
26+
- npm run coveralls
3227
- npm run smoke
3328
- cd lighthouse-extension
3429
- gulp build

lighthouse-core/.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
harmony = ""

lighthouse-core/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@
1111
"lint": "eslint --ignore-path ../.eslintignore .",
1212
"test": "npm run lint --silent && npm run unit && npm run closure",
1313
"watch": "find . -name '*.js' -not -path '*/node_modules/*' -not -path '*/extension/*' | entr npm run unit",
14-
"unit": "mocha $(find ./test -name '*.js') --timeout 60000",
15-
"unit:harmony": "mocha --harmony $(find ./test -name '*.js') --timeout 60000",
14+
"unit": "mocha $(echo $__node_harmony) $(find ./test -name '*.js') --timeout 60000",
1615
"chrome": "./scripts/launch-chrome.sh"
1716
},
1817
"repository": "googlechrome/lighthouse",

package.json

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,12 @@
1212
"postinstall": "node _install_deps.js",
1313
"lint": "eslint .",
1414
"smoke": "lighthouse-cli/scripts/run-smoke-tests.sh",
15-
"coverage": "istanbul cover -x \"**/third_party/**\" _mocha -- $(find */test -name '*.js') --timeout 60000",
16-
"coverage:harmony": "node --harmony node_modules/istanbul/lib/cli.js cover -x \"**/third_party/**\" _mocha -- $(find */test -name '*.js') --timeout 60000",
15+
"coverage": "node $(echo $__node_harmony) $(npm bin)/istanbul cover -x \"**/third_party/**\" _mocha -- $(find */test -name '*.js') --timeout 60000",
1716
"coveralls": "npm run coverage && cat ./coverage/lcov.info | coveralls",
18-
"coveralls:harmony": "npm run coverage:harmony && cat ./coverage/lcov.info | coveralls",
1917
"start": "node ./lighthouse-cli/index.js",
20-
"test": "if [[ $(node -v) =~ ^v4.* ]]; then npm run test:harmony; else npm run test:sans-harmony; fi",
21-
"test:sans-harmony": "npm run lint --silent && npm run unit && npm run closure",
22-
"test:harmony": "npm run lint --silent && npm run unit:harmony && npm run closure",
23-
"cli-unit": "mocha $(find lighthouse-cli/test -name '*.js') --timeout 60000",
24-
"cli-unit:harmony": "mocha --harmony $(find lighthouse-cli/test -name '*.js') --timeout 60000",
18+
"test": "npm run lint --silent && npm run unit && npm run closure",
19+
"cli-unit": "mocha $(echo $__node_harmony) $(find lighthouse-cli/test -name '*.js') --timeout 60000",
2520
"unit": "npm run cli-unit && npm --prefix ./lighthouse-core run unit",
26-
"unit:harmony": "npm run cli-unit:harmony && npm --prefix ./lighthouse-core run unit:harmony",
2721
"//":
2822
"// passing through tasks to core",
2923
"closure": "npm --prefix ./lighthouse-core run closure",

0 commit comments

Comments
 (0)