Skip to content

Commit d58d3bc

Browse files
chore: rename adders to addons (#303)
Co-authored-by: AdrianGonz97 <[email protected]>
1 parent 61c62ec commit d58d3bc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+334
-346
lines changed

.changeset/late-fireants-bow.md

Lines changed: 5 additions & 0 deletions

README.md

Lines changed: 1 addition & 1 deletion

community-adder-template/README.md

Lines changed: 0 additions & 58 deletions
This file was deleted.

community-adders/unocss.ts

Lines changed: 0 additions & 5 deletions
This file was deleted.

community-adders/unplugin-icons.ts

Lines changed: 0 additions & 5 deletions
This file was deleted.

community-addon-template/README.md

Lines changed: 58 additions & 0 deletions

community-adder-template/package.json renamed to community-addon-template/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "community-adder-template",
2+
"name": "community-addon-template",
33
"private": true,
44
"version": "0.0.0",
55
"type": "module",

community-adder-template/src/index.js renamed to community-addon-template/src/index.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
1-
import { defineAdder, defineAdderOptions } from '@sveltejs/cli-core';
1+
import { defineAddon, defineAddonOptions } from '@sveltejs/cli-core';
22
import { imports } from '@sveltejs/cli-core/js';
33
import { parseSvelte } from '@sveltejs/cli-core/parsers';
44

5-
export const options = defineAdderOptions({
5+
export const options = defineAddonOptions({
66
demo: {
77
question: 'Do you want to use a demo?',
88
type: 'boolean',
99
default: false
1010
}
1111
});
1212

13-
export default defineAdder({
13+
export default defineAddon({
1414
id: 'community-addon',
1515
options,
1616
setup: ({ kit, unsupported }) => {
1717
if (!kit) unsupported('Requires SvelteKit');
1818
},
1919
run: ({ sv, options, typescript }) => {
20-
sv.file('adder-template-demo.txt', (content) => {
20+
sv.file('addon-template-demo.txt', (content) => {
2121
if (options.demo) {
22-
return 'This is a text file made by the Community Adder Template demo!';
22+
return 'This is a text file made by the Community Addon Template demo!';
2323
}
2424
return content;
2525
});
2626

2727
sv.file('src/DemoComponent.svelte', (content) => {
2828
if (!options.demo) return content;
2929
const { script, generateCode } = parseSvelte(content, { typescript });
30-
imports.addDefault(script.ast, '../adder-template-demo.txt?raw', 'demo');
30+
imports.addDefault(script.ast, '../addon-template-demo.txt?raw', 'demo');
3131
return generateCode({ script: script.generateCode(), template: '{demo}' });
3232
});
3333
}

0 commit comments

Comments
 (0)