wix-style-react
Version:
wix-style-react
66 lines (62 loc) • 1.55 kB
JavaScript
const execa = require('execa');
module.exports = () => {
const plugin = '.wuf/plugins/testkit-exports/index.js';
const components = '.wuf/components.json';
const testkitExports = [
{
template: 'vanilla.template.ejs',
entry: 'index.js',
},
{
template: 'vanilla-typescript.template.ejs',
entry: 'index.d.ts',
},
{
template: 'enzyme.template.ejs',
entry: 'enzyme.js',
},
{
template: 'enzyme-typescript.template.ejs',
entry: 'enzyme.d.ts',
},
{
template: 'puppeteer.template.ejs',
entry: 'puppeteer.js',
},
{
template: 'puppeteer-typescript.template.ejs',
entry: 'puppeteer.d.ts',
},
{
template: 'unidriver.template.ejs',
entry: 'unidriver.js',
},
{
template: 'unidriver-typescript.template.ejs',
entry: 'unidriver.d.ts',
},
{
template: 'uni-driver.template.ejs',
entry: 'uni-driver.js',
},
{
template: 'uni-driver-typescript.template.ejs',
entry: 'uni-driver.d.ts',
},
{
template: 'testing-library.template.ejs',
entry: 'testing-library.js',
},
{
template: 'testing-library-typescript.template.ejs',
entry: 'testing-library.d.ts',
},
];
return Promise.all(
testkitExports.map(({ template, entry }) =>
execa.command(
`wuf make --input ${components} --plugin ${plugin} --template .wuf/plugins/testkit-exports/templates/${template} --output dist/testkit/${entry}`,
),
),
);
};