playwright/index.js
Dmitry Gozman 429720c8a3 chore: prepare to npm publish
- setup .npmignore;
- index.js selecting a browser;
- minor package.json tweaks;
- example script which works against npm pack'ed module.
2019-12-05 09:32:50 -08:00

13 lines
350 B
JavaScript

// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
module.exports = browser => {
if (browser === 'chromium')
return require('./chromium');
if (browser === 'firefox')
return require('./firefox');
if (browser === 'webkit')
return require('./webkit');
throw new Error(`Unsupported browser "${browser}"`);
};