Skip to content

Commit

Permalink
chore: address linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
mxdvl committed Dec 5, 2024
1 parent 26b7ed5 commit 84cbc81
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions src/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ import { svelte_components } from "./esbuild_plugins/svelte_components.ts";
import { create_handler } from "./server.ts";
import { write_islands } from "./esbuild_plugins/write_islands.ts";

const slashify = (path: string) => normalize(path + "/");
function slashify(path: string): string {
return normalize(path + "/");
}

type Options = {
base: string;
Expand All @@ -32,12 +34,12 @@ const flags = parseArgs(Deno.args, {
// Used by npm:esm-env
Deno.env.set("NODE_ENV", flags.watch ? "development" : "production");

const options = {
const options: Options = {
site_dir: slashify(flags.site_dir),
out_dir: slashify(flags.out_dir),
base: slashify(flags.base),
minify: !flags.watch || flags.minify,
} as const satisfies Options;
};

// clean out old builds, if they exist
const clean = async (out_dir: Options["out_dir"]) => {
Expand Down
2 changes: 1 addition & 1 deletion src/esbuild_plugins/svelte_components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export const svelte_components = (
: await Deno.readTextFile(path);

try {
const { js, warnings, metadata } = compile(
const { js, warnings } = compile(
source,
{
generate,
Expand Down

0 comments on commit 84cbc81

Please sign in to comment.