Initial Commit
* Implements Select package.json and parse dependencies * Implements Bun API to handle package Analysis * Implements NPM Registry API handlers * Analyze the cross dependencies between packages * Implements loading NodeJS versions with search (inclusing LTS) * Error handling * Implements Report option to get higher infor about the dependencies * Implements Upgrade command builder
This commit is contained in:
24
build.ts
Normal file
24
build.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
import tailwind from "bun-plugin-tailwind";
|
||||
import { rm } from "node:fs/promises";
|
||||
import path from "node:path";
|
||||
|
||||
const outdir = path.join(process.cwd(), "dist");
|
||||
await rm(outdir, { recursive: true, force: true });
|
||||
|
||||
const entrypoints = [...new Bun.Glob("src/**/*.html").scanSync()];
|
||||
|
||||
const result = await Bun.build({
|
||||
entrypoints,
|
||||
outdir,
|
||||
plugins: [tailwind],
|
||||
minify: true,
|
||||
target: "browser",
|
||||
sourcemap: "linked",
|
||||
define: {
|
||||
"process.env.NODE_ENV": JSON.stringify("production"),
|
||||
},
|
||||
});
|
||||
|
||||
for (const output of result.outputs) {
|
||||
console.log(` ${path.relative(process.cwd(), output.path)} ${(output.size / 1024).toFixed(1)} KB`);
|
||||
}
|
||||
Reference in New Issue
Block a user