ericaxu_gemmy/esbuild.config.mjs
Justice Vellacott d7879317b6 feat: add Gemmy mascot with interactive mood and speech systems
- Implemented a mascot class with various moods and reactions based on user interactions.
- Added configuration for physics, attention, blinking, and mood durations.
- Created a speech system to provide feedback based on user actions.
- Integrated event bus for handling user events like clicks and layout changes.
- Developed a physics system to simulate movement and attention based on mouse activity.
- Included SVG representation for the mascot's appearance.
- Added utility functions for random selection and range generation.
2025-12-26 13:54:19 -05:00

52 lines
1,016 B
JavaScript

import esbuild from "esbuild";
import process from "process";
import builtins from "builtin-modules";
const banner = `/*
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
if you want to view the source, please visit the github repository of this plugin
*/
`;
const prod = process.argv[2] === "production";
const context = await esbuild.context({
banner: {
js: banner,
},
entryPoints: ["src/main.ts"],
bundle: true,
external: [
"obsidian",
"electron",
"@codemirror/autocomplete",
"@codemirror/collab",
"@codemirror/commands",
"@codemirror/language",
"@codemirror/lint",
"@codemirror/search",
"@codemirror/state",
"@codemirror/view",
"@lezer/common",
"@lezer/highlight",
"@lezer/lr",
...builtins,
],
format: "cjs",
target: "es2018",
logLevel: "info",
sourcemap: prod ? false : "inline",
treeShaking: true,
outfile: "main.js",
loader: {
".png": "dataurl",
".gif": "dataurl",
},
});
if (prod) {
await context.rebuild();
process.exit(0);
} else {
await context.watch();
}