better file structure

This commit is contained in:
Anil Erdogan 2023-11-24 14:53:09 +01:00
parent cb5efa72ce
commit 4cf1697db9
4 changed files with 7 additions and 7 deletions

View file

@ -2,20 +2,19 @@ import esbuild from "esbuild";
import process from "process";
import builtins from "builtin-modules";
const banner =
`/*
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 prod = process.argv[2] === "production";
const context = await esbuild.context({
banner: {
js: banner,
},
entryPoints: ["main.ts"],
entryPoints: ["src/main.ts"],
bundle: true,
external: [
"obsidian",
@ -31,7 +30,8 @@ const context = await esbuild.context({
"@lezer/common",
"@lezer/highlight",
"@lezer/lr",
...builtins],
...builtins,
],
format: "cjs",
target: "es2018",
logLevel: "info",
@ -45,4 +45,4 @@ if (prod) {
process.exit(0);
} else {
await context.watch();
}
}

View file

@ -6,7 +6,7 @@
"scripts": {
"dev": "node esbuild.config.mjs",
"build": "tsc -noEmit -skipLibCheck && node esbuild.config.mjs production",
"version": "node version-bump.mjs && git add manifest.json versions.json"
"version": "node scripts/version-bump.mjs && git add manifest.json versions.json"
},
"keywords": [],
"author": "",