Skip to content

Commit

Permalink
Add Deno Windows fix to /docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jimjam-slam authored Jul 11, 2023
1 parent f0e3bb7 commit cb79b70
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions docs/_extensions/sverto/compile-imports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ import * as path from "https://deno.land/std/path/mod.ts";
const thisScript = path.fromFileUrl(import.meta.url);
const rollupConfig = path.join(path.dirname(thisScript), "rollup.config.js");

// run svelte compiler via rollup
// (prepend cmd /c to the command on windows)
const cmdPrefix = Deno.build.os == "windows" ? ["cmd", "/c"] : []
const cmd = cmdPrefix.concat(["npm", "run", "build", rollupConfig]);

// call rollup with the config file
const cmd = ["npm", "run", "build", rollupConfig];
const compileStep = Deno.run({ cmd });
await compileStep.status();

// console.log("Svelte compilation + bundling done!");

0 comments on commit cb79b70

Please sign in to comment.