chore: make sure Puppeteer bundling works (#3239)

This patch:
- adds "browser" field to the package.json with default
  bundling options.
- introduces "bundle" and "unit-bundle" commands to
  create bundle and test bundle
- starts running bundle tests on Travis Node 8 bots

Fixes #2374.
This commit is contained in:
Andrey Lushnikov
2018-09-13 20:08:51 +01:00
committed by GitHub
parent f49687f747
commit 6ec3ce6920
6 changed files with 97 additions and 1 deletions

View File

@@ -24,7 +24,9 @@
"unit-node6": "node node6/test/test.js",
"tsc": "tsc -p .",
"prepublishOnly": "npm run build",
"apply-next-version": "node utils/apply_next_version.js"
"apply-next-version": "node utils/apply_next_version.js",
"bundle": "npx browserify -r ./index.js:puppeteer -o utils/browser/puppeteer-web.js",
"unit-bundle": "node utils/browser/test.js"
},
"author": "The Chromium Authors",
"license": "Apache-2.0",
@@ -55,5 +57,14 @@
"pngjs": "^3.3.3",
"text-diff": "^1.0.1",
"typescript": "^3.0.1"
},
"browser": {
"./lib/BrowserFetcher.js": false,
"./node6/lib/Puppeteer": false,
"ws": "./utils/browser/WebSocket",
"fs": false,
"child_process": false,
"rimraf": false,
"readline": false
}
}