playwright/index.js
Dmitry Gozman 0a9377e0a9 chore: prepare to npm publish (#148)
- setup .npmignore;
- index.js selecting a browser;
- minor package.json tweaks;
- example script which works against npm pack'ed module.
2019-12-05 11:29:16 -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}"`);
};