Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

devops: include protocol and api.md in NPM package (#3195)

Max Schmittd27f97edb16c
diff --git a/.npmignore b/.npmignore
index 39806bed37..59a4e49914 100644
--- a/.npmignore
+++ b/.npmignore
@@ -19,6 +19,8 @@ lib/injected/
!README.md
!LICENSE
!NOTICE
+!api.md
+!protocol.yml
# browser descriptor
!browsers.json
diff --git a/packages/build_package.js b/packages/build_package.js
index f5f4df6e38..1349f0c4d5 100755
--- a/packages/build_package.js
+++ b/packages/build_package.js
@@ -118,6 +118,9 @@ if (!args.some(arg => arg === '--no-cleanup')) {
for (const file of package.files)
await copyToPackage(path.join(ROOT_PATH, file), path.join(packagePath, file));
+ await copyToPackage(path.join(ROOT_PATH, 'docs/api.md'), path.join(packagePath, 'api.md'));
+ await copyToPackage(path.join(ROOT_PATH, 'src/rpc/protocol.yml'), path.join(packagePath, 'protocol.yml'));
+
// 4. Generate package.json
const pwInternalJSON = require(path.join(ROOT_PATH, 'package.json'));
await writeToPackage('package.json', JSON.stringify({