Add notepad

This commit is contained in:
proteriax
2021-10-26 20:48:58 -04:00
parent 7c12f499f2
commit 26f8485761
14 changed files with 2590 additions and 934 deletions

44
esbuild.js Executable file
View File

@ -0,0 +1,44 @@
#!/usr/bin/env node
// @ts-check
const { build } = require("esbuild")
const sassPlugin = require("esbuild-plugin-sass")
const { nodeBuiltIns } = require("esbuild-node-builtins")
const args = process.argv.slice(2)
build({
bundle: true,
define: {
"process.browser": "true",
"process.env.BLUEPRINT_NAMESPACE": '"bp4"',
global: "globalThis",
},
entryPoints: ["electron/app/index.tsx"],
inject: ["./scripts/react-shim.js"],
outdir: "electron/bundled",
external: ["path", "glob", "fs", "util"],
jsxFactory: "esbuildCreateElement",
jsxFragment: "esbuildFragment",
plugins: [
sassPlugin(),
nodeBuiltIns({
include: ["path", "fs"],
}),
],
target: ["chrome90"],
tsconfig: "./tsconfig.json",
sourcemap: "inline",
minify: process.env.NODE_ENV === "production",
banner: {
js: "/* eslint-disable */",
},
loader: {
".png": "file",
".eot": "file",
".svg": "file",
".woff": "file",
".woff2": "file",
".ttf": "file",
},
watch: args.includes("-w") || args.includes("--watch"),
})