Skip to content
This repository was archived by the owner on Apr 26, 2022. It is now read-only.
This repository was archived by the owner on Apr 26, 2022. It is now read-only.

Support for extension dropping #112

@maraisr

Description

@maraisr

If you have a directory, with say templates/{index.js,test.js}.hbs - and run the action addMany, could that potentially support an additional property to drop of a file extension?

as in:

module.exports = function(plop) {
	plop.setGenerator('component', {
		description: 'Generate a new component',
		prompts: [
			{
				type: 'input',
				name: 'name',
				message: 'component name?',
			},
		],
		actions() {
			return [
				{
					type: 'addMany',
					destination: 'lib/components/{{ pascalCase name }}.{{ ext }}',
					base: 'templates/component/',
                                        ext: 'without-hbs', // or 'as-is', or ext(incomingFile:string): string
					templateFiles: 'templates/component/**/*',
				},
			];
		},
	});
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions