Skip to content

Commit bb01514

Browse files
authored
create-svelte: Actually fix component => lib transition (#529)
1 parent 0649eeb commit bb01514

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

Diff for: .changeset/rotten-singers-taste.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'create-svelte': patch
3+
---
4+
5+
Actually fix $component => $lib transition

Diff for: packages/create-svelte/cli/modifications/add_css.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export default async function add_css(cwd, which) {
99
less: '^3.0.0',
1010
'svelte-preprocess': '^4.0.0'
1111
});
12-
update_component(cwd, 'src/components/Counter.svelte', [['<style>', '<style lang="less">']]);
12+
update_component(cwd, 'src/lib/Counter.svelte', [['<style>', '<style lang="less">']]);
1313
update_component(cwd, 'src/routes/index.svelte', [['<style>', '<style lang="less">']]);
1414
add_svelte_preprocess_to_config(cwd);
1515
console.log(
@@ -25,7 +25,7 @@ export default async function add_css(cwd, which) {
2525
sass: '^1.0.0',
2626
'svelte-preprocess': '^4.0.0'
2727
});
28-
update_component(cwd, 'src/components/Counter.svelte', [['<style>', '<style lang="scss">']]);
28+
update_component(cwd, 'src/lib/Counter.svelte', [['<style>', '<style lang="scss">']]);
2929
update_component(cwd, 'src/routes/index.svelte', [['<style>', '<style lang="scss">']]);
3030
add_svelte_preprocess_to_config(cwd);
3131
console.log(

Diff for: packages/create-svelte/cli/modifications/add_typescript.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export default async function add_typescript(cwd, yes) {
1010
tslib: '^2.0.0',
1111
'svelte-preprocess': '^4.0.0'
1212
});
13-
update_component(cwd, 'src/components/Counter.svelte', [
13+
update_component(cwd, 'src/lib/Counter.svelte', [
1414
['<script>', '<script lang="ts">'],
1515
['let count = 0', 'let count: number = 0']
1616
]);

Diff for: packages/create-svelte/ts-template/tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"checkJs": true,
2222
"paths": {
2323
"$app/*": [".svelte/dev/runtime/app/*", ".svelte/build/runtime/app/*"],
24-
"$components/*": ["src/components/*"]
24+
"$lib/*": ["src/lib/*"]
2525
}
2626
},
2727
"include": ["src/**/*.js", "src/**/*.ts", "src/**/*.svelte"]

0 commit comments

Comments
 (0)