Skip to content

create-svelte: fix global.d.ts rename, Windows build issue, missing adapter-node #1095

New issue

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

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

Already on GitHub? # to your account

Merged
merged 1 commit into from
Apr 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/thin-planets-obey.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'create-svelte': patch
---

Fix global.d.ts rename, Windows build issue, missing adapter-node
7 changes: 2 additions & 5 deletions packages/create-svelte/scripts/build-templates.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,7 @@ async function generate_templates(shared) {
// also needed for JS projects if people turn on "checkJs" in their jsonfig
if (file.name.endsWith('.d.ts')) {
if (file.name.endsWith('global.d.ts')) js.push(file);
continue;
}

if (file.name.endsWith('.ts')) {
} else if (file.name.endsWith('.ts')) {
const transformed = transform(file.contents, {
transforms: ['typescript']
});
Expand Down Expand Up @@ -161,7 +158,7 @@ async function generate_shared() {
let name = file;

if (file.startsWith('+') || file.startsWith('-')) {
const [conditions, ...rest] = file.split('/');
const [conditions, ...rest] = file.split(path.sep);

const pattern = /([+-])([a-z]+)/g;
let match;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"start": "svelte-kit start"
},
"devDependencies": {
"@sveltejs/adapter-node": "workspace:*",
"@sveltejs/kit": "workspace:*",
"svelte": "^3.29.0",
"vite": "^2.1.0"
Expand Down