use npm prepare
This commit is contained in:
parent
1d884c5a52
commit
f8c193e51f
|
|
@ -19,7 +19,7 @@
|
||||||
"debug-unit": "node --inspect-brk test/test.js",
|
"debug-unit": "node --inspect-brk test/test.js",
|
||||||
"test-doclint": "node utils/doclint/check_public_api/test/test.js && node utils/doclint/preprocessor/test.js",
|
"test-doclint": "node utils/doclint/check_public_api/test/test.js && node utils/doclint/preprocessor/test.js",
|
||||||
"test": "npm run lint --silent && npm run coverage && npm run test-doclint && node utils/testrunner/test/test.js",
|
"test": "npm run lint --silent && npm run coverage && npm run test-doclint && node utils/testrunner/test/test.js",
|
||||||
"install": "node -e \"try { require('./install-development.js'); } catch(e) { }\"",
|
"prepare": "node prepare.js",
|
||||||
"lint": "([ \"$CI\" = true ] && eslint --quiet -f codeframe --ext js,ts ./src || eslint --ext js,ts ./src) && npm run tsc && npm run doc",
|
"lint": "([ \"$CI\" = true ] && eslint --quiet -f codeframe --ext js,ts ./src || eslint --ext js,ts ./src) && npm run tsc && npm run doc",
|
||||||
"doc": "node utils/doclint/cli.js",
|
"doc": "node utils/doclint/cli.js",
|
||||||
"coverage": "cross-env COVERAGE=true npm run unit",
|
"coverage": "cross-env COVERAGE=true npm run unit",
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// This file is only run when someone clones the github repo for development
|
// This file is only run when someone installs via the github repo
|
||||||
|
|
||||||
try {
|
try {
|
||||||
console.log('Building playwright...');
|
console.log('Building playwright...');
|
||||||
|
|
@ -56,6 +56,7 @@ async function downloadAndCleanup(browser) {
|
||||||
// Remove previous revisions.
|
// Remove previous revisions.
|
||||||
const playwright = require('.')[browser];
|
const playwright = require('.')[browser];
|
||||||
const fetcher = playwright._createBrowserFetcher();
|
const fetcher = playwright._createBrowserFetcher();
|
||||||
|
const localRevisions = await fetcher.localRevisions();
|
||||||
const cleanupOldVersions = localRevisions.filter(revision => revision !== revisionInfo.revision).map(revision => fetcher.remove(revision));
|
const cleanupOldVersions = localRevisions.filter(revision => revision !== revisionInfo.revision).map(revision => fetcher.remove(revision));
|
||||||
await Promise.all([...cleanupOldVersions]);
|
await Promise.all([...cleanupOldVersions]);
|
||||||
|
|
||||||
Loading…
Reference in a new issue