setup project

This commit is contained in:
Nystik
2026-03-07 09:04:22 +01:00
parent 4f66442422
commit 0c040f1e1e
2 changed files with 36 additions and 0 deletions

15
build.js Normal file
View File

@@ -0,0 +1,15 @@
const esbuild = require('esbuild');
const path = require('path');
esbuild.build({
entryPoints: [path.join(__dirname, 'shims', 'loader.js')],
bundle: true,
outfile: path.join(__dirname, 'dist', 'shim-loader.js'),
format: 'iife',
platform: 'browser',
target: ['chrome90'],
alias: {
'path': 'path-browserify',
},
logLevel: 'info',
}).catch(() => process.exit(1));

21
package.json Normal file
View File

@@ -0,0 +1,21 @@
{
"name": "obsidian-bridge",
"version": "0.1.0",
"private": true,
"description": "Self-hosted Obsidian via Electron API shimming",
"scripts": {
"build:shims": "node build.js",
"dev:server": "node server/index.js",
"dev": "npm run build:shims && npm run dev:server"
},
"dependencies": {
"express": "^4.21.0",
"ws": "^8.16.0",
"chokidar": "^3.6.0",
"cors": "^2.8.5"
},
"devDependencies": {
"esbuild": "^0.20.0",
"path-browserify": "^1.0.1"
}
}