Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support generating V2 Addons #10129

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 7 additions & 0 deletions lib/commands/addon.js
Expand Up @@ -27,6 +27,13 @@ module.exports = NewCommand.extend({
description: 'Installs the default CI blueprint. Either Travis or Github Actions is supported.',
},
{ name: 'typescript', type: Boolean, default: false, description: 'Set up the addon to use TypeScript' },
{
name: 'v2',
aliases: ['v2'], // support --v2 as well as -v2
type: Boolean,
// Default false until all of the embroider things become default
default: false,
description: 'Set up the addon using the V2 package format. Uses @embroider/addon-blueprint' },
],

anonymousOptions: ['<addon-name>'],
Expand Down
4 changes: 4 additions & 0 deletions lib/commands/new.js
Expand Up @@ -104,6 +104,10 @@ module.exports = Command.extend({
return Promise.reject(new SilentError(message));
}

if (commandOptions.v2) {
commandOptions.blueprint = '@embroider/addon-blueprint';
}

commandOptions.blueprint = normalizeBlueprint(commandOptions.blueprint);

let InitCommand = this.commands.Init;
Expand Down
4 changes: 4 additions & 0 deletions lib/tasks/interactive-new.js
Expand Up @@ -38,6 +38,10 @@ class InteractiveNewTask extends Task {
name: 'Addon',
value: 'addon',
},
{
name: 'V2 Addon',
value: '@embroider/addon-blueprint',
}
],
},
{
Expand Down