add back playwright package that downloads all browsers
This commit is contained in:
parent
bbb8845db5
commit
9c4c4808b9
|
|
@ -1,2 +1,2 @@
|
|||
# playwright
|
||||
This is a placeholder package for [Playwright](http://github.com/microsoft/playwright). Install one of `playwright-chromium`, `playwright-webkit`, or `playwright-firefox` to use playwright.
|
||||
This packagage contains the [Chromium](https://www.chromium.org/), [Firefox](https://www.mozilla.org/firefox/) and [WebKit](https://www.webkit.org/) flavors of [Playwright](http://github.com/microsoft/playwright).
|
||||
|
|
|
|||
16
packages/playwright/index.js
Normal file
16
packages/playwright/index.js
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
/**
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
module.exports = require('playwright-core');
|
||||
|
|
@ -13,5 +13,9 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
console.error('This package, "playwright", is a placeholder. Please install "playwright-chromium", "playwright-firefox", or "playwright-webkit" to use playwright.');
|
||||
process.exit(1);
|
||||
const {downloadBrowser} = require('playwright-core/download-browser');
|
||||
(async function() {
|
||||
await downloadBrowser('chromium');
|
||||
await downloadBrowser('firefox');
|
||||
await downloadBrowser('webkit');
|
||||
})();
|
||||
|
|
|
|||
|
|
@ -10,5 +10,8 @@
|
|||
"author": {
|
||||
"name": "Microsoft Corporation"
|
||||
},
|
||||
"license": "Apache-2.0"
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"playwright-core": "=0.9.13-post"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,11 +16,8 @@
|
|||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const {version} = require('../package.json');
|
||||
updatePackage('playwright', packageJSON => {
|
||||
packageJSON.version = version;
|
||||
});
|
||||
|
||||
for (const packageName of ['playwright-chromium', 'playwright-firefox', 'playwright-webkit']) {
|
||||
for (const packageName of ['playwright-chromium', 'playwright-firefox', 'playwright-webkit', 'playwright']) {
|
||||
updatePackage(packageName, packageJSON => {
|
||||
packageJSON.version = version;
|
||||
packageJSON.dependencies['playwright-core'] = `=${version}`;
|
||||
|
|
|
|||
Loading…
Reference in a new issue