File size: 561 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
import { actions, prompts } from './constants.js';
const componentGenerator = {
description: 'Add a new library of React components designed for use in Automattic products.',
prompts,
actions: () => [
...actions,
{
type: 'add',
path: '../{{kebabCase name}}/package.json',
templateFile: 'templates/component/package.json.hbs',
abortOnFail: true,
},
{
type: 'add',
path: '../{{kebabCase name}}/src/index.tsx',
templateFile: 'templates/component/index.js.hbs',
abortOnFail: true,
},
],
};
export default componentGenerator;
|