chore: generate README.md for playwright package on prepublish (#1801)

This will ensure that `playwright` package always has a readme.

Fix #1798
This commit is contained in:
Andrey Lushnikov 2020-04-15 11:29:59 -07:00 committed by GitHub
parent 762dfe1a59
commit 9efc66366c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 4 deletions

View File

@ -5,7 +5,8 @@
"repository": "github:Microsoft/playwright",
"main": "index.js",
"scripts": {
"install": "node install.js"
"install": "node install.js",
"prepublishOnly": "cp ../../README.md ."
},
"author": {
"name": "Microsoft Corporation"

View File

@ -70,8 +70,6 @@ async function run() {
await source.save();
changedFiles = true;
}
await readme.saveAs(path.join(PROJECT_DIR, 'packages', 'playwright', 'README.md'));
}
// Report results.
@ -134,4 +132,4 @@ async function getFirefoxVersion() {
const out = spawnSync(playwright.firefox.executablePath(), [isWin ? '/version' : '--version'], undefined);
const version = out.stdout.toString();
return version.trim().split(' ').pop();
}
}