skip-event-bridge
Version:
Event bridge to partner tracking SDKs
52 lines (51 loc) • 1.32 kB
JavaScript
export default function (plop) {
// controller generator
plop.setGenerator('controller', {
description: 'application controller logic',
prompts: [
{
type: 'input',
name: 'eventName',
message: 'Please provide an event name'
}
],
actions: [
{
type: 'append',
path: './src/types.ts',
pattern: '// plop EventSdk',
templateFile: 'plop-templates/TypesEventSdk.hbs'
},
{
type: 'append',
path: './src/types.ts',
pattern: '// plop provider',
templateFile: 'plop-templates/TypesProvider.hbs'
},
{
type: 'append',
path: './src/EventAction.ts',
pattern: '// plop',
templateFile: 'plop-templates/EventAction.hbs'
},
{
type: 'append',
path: './src/SkipEventSdk.ts',
pattern: '// plop',
templateFile: 'plop-templates/SkipEventSdk.hbs'
},
{
type: 'append',
path: './src/strategies/WebStrategy.ts',
pattern: '// plop',
templateFile: 'plop-templates/WebStrategy.hbs'
},
{
type: 'append',
path: './src/strategies/MobileStrategy.ts',
pattern: '// plop',
templateFile: 'plop-templates/MobileStrategy.hbs'
}
]
});
}