diff --git a/community-adder-template/package.json b/community-adder-template/package.json index 91f9b34c9..557b1e559 100644 --- a/community-adder-template/package.json +++ b/community-adder-template/package.json @@ -6,9 +6,7 @@ "type": "module", "exports": "./src/index.js", "keywords": [ - "sv-adder", - "sv-add", - "sv-integration", + "svelte-add-on", "sv" ], "scripts": { diff --git a/community-adders/unocss.ts b/community-adders/unocss.ts index b83720021..03f1d8a24 100644 --- a/community-adders/unocss.ts +++ b/community-adders/unocss.ts @@ -1,5 +1,5 @@ import type { CommunityAdder } from '../packages/adders/_config/community.ts'; export default { - id: 'unocss-svelte-integration' + id: 'unocss-svelte-add-on' } satisfies CommunityAdder; diff --git a/community-adders/unplugin-icons.ts b/community-adders/unplugin-icons.ts index a0b343c92..bdeeb6aac 100644 --- a/community-adders/unplugin-icons.ts +++ b/community-adders/unplugin-icons.ts @@ -1,5 +1,5 @@ import type { CommunityAdder } from '../packages/adders/_config/community.ts'; export default { - id: 'unplugin-icons-svelte-integration' + id: 'unplugin-icons-svelte-add-on' } satisfies CommunityAdder; diff --git a/documentation/docs/20-commands/10-sv-create.md b/documentation/docs/20-commands/10-sv-create.md index 815106bce..7425d3f3c 100644 --- a/documentation/docs/20-commands/10-sv-create.md +++ b/documentation/docs/20-commands/10-sv-create.md @@ -31,9 +31,7 @@ Whether and how to add typechecking to the project: Prevent typechecking from being added. Not recommended! -### `--no-integrations` - - +### `--no-add-ons` Run the command without the interactive add-ons prompt diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.md index 87c52a2c4..c90a7ad57 100644 --- a/packages/cli/CHANGELOG.md +++ b/packages/cli/CHANGELOG.md @@ -112,7 +112,7 @@ - fix: improve formatting on new script files ([#96](https://github.com/sveltejs/cli/pull/96)) -- fix: dont check preconditions if no integration selected ([#125](https://github.com/sveltejs/cli/pull/125)) +- fix: dont check preconditions if no add-on selected ([#125](https://github.com/sveltejs/cli/pull/125)) - feat: improved homescreen for adding or creating projects ([#112](https://github.com/sveltejs/cli/pull/112)) @@ -127,4 +127,4 @@ ### Patch Changes -- feat: paraglide integration ([#67](https://github.com/sveltejs/cli/pull/67)) +- feat: paraglide add-on ([#67](https://github.com/sveltejs/cli/pull/67)) diff --git a/packages/cli/commands/add/index.ts b/packages/cli/commands/add/index.ts index ed6cb07ce..a91ea35cb 100644 --- a/packages/cli/commands/add/index.ts +++ b/packages/cli/commands/add/index.ts @@ -46,8 +46,8 @@ const defaultPkgPath = pkg.up(); const defaultCwd = defaultPkgPath ? path.dirname(defaultPkgPath) : undefined; export const add = new Command('add') - .description('applies specified integrations into a project') - .argument('[integration...]', 'integrations to install') + .description('applies specified add-ons into a project') + .argument('[add-on...]', 'add-ons to install') .option('-C, --cwd ', 'path to working directory', defaultCwd) .option('--no-install', 'skip installing dependencies') .option('--no-preconditions', 'skip validating preconditions') @@ -317,7 +317,7 @@ export async function runAddCommand( // prompt to install the dependent const install = await p.confirm({ - message: `The ${pc.bold(pc.cyan(adder.id))} integration requires ${pc.bold(pc.cyan(depId))} to also be setup. ${pc.green('Include it?')}` + message: `The ${pc.bold(pc.cyan(adder.id))} add-on requires ${pc.bold(pc.cyan(depId))} to also be setup. ${pc.green('Include it?')}` }); if (install !== true) { p.cancel('Operation cancelled.'); @@ -430,7 +430,7 @@ export async function runAddCommand( // apply adders const filesToFormat = await runAdders({ cwd: options.cwd, packageManager, official, community }); - p.log.success('Successfully setup integrations'); + p.log.success('Successfully setup add-ons'); // install dependencies if (packageManager && options.install) { @@ -589,7 +589,7 @@ function getAdderOptionFlags(): Option[] { const preset = defaults.join(', ') || 'none'; const option = new Option( `--${id} [options...]`, - `${id} integration options ${pc.dim(`(preset: ${preset})`)}\n${choices}` + `${id} add-on options ${pc.dim(`(preset: ${preset})`)}\n${choices}` ) // presets are applied when `--adder` is specified with no options .preset(preset) diff --git a/packages/cli/commands/create.ts b/packages/cli/commands/create.ts index c43510046..37a5267d3 100644 --- a/packages/cli/commands/create.ts +++ b/packages/cli/commands/create.ts @@ -33,7 +33,7 @@ const OptionsSchema = v.strictObject({ v.optional(v.union([v.picklist(langs), v.boolean()])), v.transform((lang) => langMap[String(lang)]) ), - integrations: v.boolean(), + addOns: v.boolean(), install: v.boolean(), template: v.optional(v.picklist(templateChoices)) }); @@ -45,14 +45,14 @@ export const create = new Command('create') .addOption(templateOption) .addOption(langOption) .option('--no-types') - .option('--no-integrations', 'skip interactive integration installer') + .option('--no-add-ons', 'skips interactive add-on installer') .option('--no-install', 'skip installing dependencies') .configureHelp(common.helpConfig) .action((projectPath, opts) => { const cwd = v.parse(ProjectPathSchema, projectPath); const options = v.parse(OptionsSchema, opts); common.runCommand(async () => { - const { directory, integrationNextSteps, packageManager } = await createProject(cwd, options); + const { directory, addOnNextSteps, packageManager } = await createProject(cwd, options); const highlight = (str: string) => pc.bold(pc.cyan(str)); let i = 1; @@ -81,7 +81,7 @@ export const create = new Command('create') ]; p.box(steps.join('\n'), 'Project next steps'); - if (integrationNextSteps) p.box(integrationNextSteps, 'Integration next steps'); + if (addOnNextSteps) p.box(addOnNextSteps, 'Add-on next steps'); }); }); @@ -152,30 +152,30 @@ async function createProject(cwd: string, options: Options) { p.log.success('Project created'); let packageManager: AgentName | undefined | null; - let integrationNextSteps: string | undefined; + let addOnNextSteps: string | undefined; const installDeps = async () => { packageManager = await common.packageManagerPrompt(projectPath); if (packageManager) await common.installDependencies(packageManager, projectPath); }; - if (options.integrations) { + if (options.addOns) { // `runAddCommand` includes installing dependencies const { nextSteps, packageManager: pm } = await runAddCommand( { cwd: projectPath, install: options.install, preconditions: true, community: [] }, [] ); packageManager = pm; - integrationNextSteps = nextSteps; + addOnNextSteps = nextSteps; } else if (options.install) { - // `--no-integrations` was set, so we'll prompt to install deps manually + // `--no-add-ons` was set, so we'll prompt to install deps manually await installDeps(); } - // no integrations were selected (which means the install prompt was skipped in `runAddCommand`), + // no add-ons were selected (which means the install prompt was skipped in `runAddCommand`), // so we'll prompt to install if (packageManager === null && options.install) { await installDeps(); } - return { directory: projectPath, integrationNextSteps, packageManager }; + return { directory: projectPath, addOnNextSteps, packageManager }; }