-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updates esbuild (to support jsr for example)
- Loading branch information
Showing
3 changed files
with
17 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,10 @@ | ||
// Import the WASM build on platforms where running subprocesses is not | ||
// permitted, such as Deno Deploy, or when running without `--allow-run`. | ||
import * as esbuild from "https://deno.land/x/[email protected]/mod.js"; | ||
// import * as esbuild from "https://deno.land/x/[email protected]/wasm.js"; | ||
|
||
import * as esbuild from "npm:esbuild@^0.23.0" | ||
import { compile as compileMdx } from "https://esm.sh/@mdx-js/[email protected]" | ||
import { renderToStaticMarkup as compileReactStatic } from "https://esm.sh/[email protected]/server" | ||
import { denoLoaderPlugin, denoResolverPlugin } from "https://deno.land/x/[email protected]/mod.ts"; | ||
import {parseArgs} from "https://deno.land/[email protected]/cli/parse_args.ts"; | ||
import { isAbsolute, join, resolve, normalize, dirname } from "https://deno.land/[email protected]/path/mod.ts"; | ||
import { denoLoaderPlugin, denoResolverPlugin } from "jsr:@luca/esbuild-deno-loader@^0.10.3"; | ||
import React from "https://esm.sh/[email protected]"; | ||
import {parseArgs} from "jsr:@std/cli@^0.224.7/parse-args"; | ||
import { isAbsolute, join, resolve, normalize, dirname, extname, parse } from 'jsr:@std/path@^0.225.2' | ||
|
||
export { | ||
// esbuild | ||
|
@@ -33,5 +29,7 @@ export { | |
join, | ||
resolve, | ||
normalize, | ||
dirname | ||
dirname, | ||
extname, | ||
parse | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,9 @@ import { isAbsolute, join, resolve, normalize } from "./deps.ts"; | |
import { serve, setServeDir } from "./serve.ts"; | ||
import { compileMdx, mdxPlugin } from './plugin-mdx.ts' | ||
import { compileReactStatic } from "./plugin-react-static.tsx"; | ||
import { extname, parse } from "https://deno.land/[email protected]/path/mod.ts"; | ||
import { extname, parse } from "./deps.ts"; | ||
|
||
export const VERSION = "0.1.2" | ||
|
||
const isDev = Deno.env.get("DENO_ENV") === "development"; | ||
let isFirstBuild = true; | ||
|
@@ -432,7 +434,7 @@ export const buildReactStatic = async (options: { | |
} | ||
|
||
if (import.meta.main) { | ||
const helpText = `dsbuild - Deno + esbuild | ||
const helpText = `dsbuild (Deno + esbuild) v${VERSION} | ||
This is a simple build tool for Deno + esbuild. It compiles Deno TypeScript | ||
to a single JavaScript file that can be run in the browser. | ||
|
@@ -466,11 +468,16 @@ Example usage: | |
const args = parseArgs(Deno.args); | ||
|
||
const isHelp = args["help"] || args["h"]; | ||
const isVersion = args["version"] || args["v"]; | ||
|
||
if (isHelp) { | ||
console.log(helpText); | ||
Deno.exit(0); | ||
} | ||
if (isVersion) { | ||
console.log(VERSION); | ||
Deno.exit(0); | ||
} | ||
|
||
const generateTsConfig = args['tsconfig'] || false; | ||
const generateDenoConfig = args['denoconfig'] || false; | ||
|