Skip to content

Commit f0e3bb7

Browse files
authored
Merge pull request #19 from jimjam-slam/bugfix-windowsdeno
Bugfix: Deno cmd on Windows, manual CI/CD dispatch
2 parents aae628c + 8a5c1fa commit f0e3bb7

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

.github/workflows/check.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# workflow to test sverto
22

33
on:
4+
workflow_dispatch:
45
push:
56
branches: [main, dev]
67
pull_request:

_extensions/sverto/compile-imports.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@ import * as path from "https://deno.land/std/path/mod.ts";
55
const thisScript = path.fromFileUrl(import.meta.url);
66
const rollupConfig = path.join(path.dirname(thisScript), "rollup.config.js");
77

8+
// run svelte compiler via rollup
9+
// (prepend cmd /c to the command on windows)
10+
const cmdPrefix = Deno.build.os == "windows" ? ["cmd", "/c"] : []
11+
const cmd = cmdPrefix.concat(["npm", "run", "build", rollupConfig]);
12+
813
// call rollup with the config file
9-
const cmd = ["npm", "run", "build", rollupConfig];
1014
const compileStep = Deno.run({ cmd });
1115
await compileStep.status();
12-
13-
// console.log("Svelte compilation + bundling done!");

0 commit comments

Comments
 (0)