Import lufi using deno
This commit is contained in:
parent
6dd9b5b27e
commit
3b5a679028
18
bundler.ts
18
bundler.ts
|
@ -65,3 +65,21 @@ export const buildJS = await esbuild.context({
|
||||||
format: "esm",
|
format: "esm",
|
||||||
target: ["deno2", "chrome67", "firefox68"],
|
target: ["deno2", "chrome67", "firefox68"],
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Extract Lufi from a Deno lib to a JS file
|
||||||
|
*/
|
||||||
|
export const extractLufi = await esbuild.context({
|
||||||
|
plugins: [...denoPlugins()],
|
||||||
|
entryPoints: ["@booteille/lufi-api"],
|
||||||
|
outdir: `${themeDir}/public/js/lib`,
|
||||||
|
entryNames: "lufi",
|
||||||
|
bundle: true,
|
||||||
|
minify: false,
|
||||||
|
sourcemap: false,
|
||||||
|
allowOverwrite: true,
|
||||||
|
format: "esm",
|
||||||
|
target: ["deno2", "chrome67", "firefox68"],
|
||||||
|
});
|
||||||
|
await extractLufi.rebuild();
|
||||||
|
extractLufi.dispose();
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
"watch": "deno run --allow-all bundler.watch.ts"
|
"watch": "deno run --allow-all bundler.watch.ts"
|
||||||
},
|
},
|
||||||
"imports": {
|
"imports": {
|
||||||
|
"@booteille/lufi-api": "jsr:@booteille/lufi-api@^0.3.0",
|
||||||
"@fortawesome/fontawesome-free": "npm:@fortawesome/fontawesome-free@^6.7.2",
|
"@fortawesome/fontawesome-free": "npm:@fortawesome/fontawesome-free@^6.7.2",
|
||||||
"esbuild": "npm:esbuild@^0.25.4",
|
"esbuild": "npm:esbuild@^0.25.4",
|
||||||
"esbuild-plugin-ignore": "npm:esbuild-plugin-ignore@^1.1.1",
|
"esbuild-plugin-ignore": "npm:esbuild-plugin-ignore@^1.1.1",
|
||||||
|
|
Loading…
Reference in New Issue