You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
658 B
TypeScript
26 lines
658 B
TypeScript
import { emptyDir } from "https://deno.land/std@0.162.0/fs/mod.ts";
|
|
import sass from "https://deno.land/x/denosass@1.0.6/mod.ts";
|
|
import { build, stop } from "https://deno.land/x/esbuild@v0.17.5/mod.js";
|
|
import { httpImports } from "https://deno.land/x/esbuild_plugin_http_imports@v1.2.4/index.ts";
|
|
|
|
await emptyDir("./build");
|
|
|
|
const compiler = sass(["./ui/style.scss"]);
|
|
compiler.to_file({
|
|
destDir: "./build/",
|
|
destFile: "style",
|
|
format: "compressed",
|
|
});
|
|
|
|
const res = await build({
|
|
entryPoints: ["./ui/main.ts"],
|
|
write: true,
|
|
bundle: true,
|
|
outfile: "./build/app.js",
|
|
sourcemap: "inline",
|
|
plugins: [httpImports()],
|
|
});
|
|
console.debug(res);
|
|
|
|
stop();
|