From cac37d2ff5f4123818f4cec0c0ca5c987df909c4 Mon Sep 17 00:00:00 2001 From: mpstaton Date: Sat, 19 Jul 2025 19:04:08 +0300 Subject: [PATCH] improve(setup-script): improve setup script to hopefully work, unsure yet On branch refactor/refactor-to-starter-code Changes to be committed: modified: README.md modified: package.json modified: setup-plugin.mjs --- README.md | 15 +++++++++++++++ package.json | 1 + setup-plugin.mjs | 0 3 files changed, 16 insertions(+) mode change 100644 => 100755 setup-plugin.mjs diff --git a/README.md b/README.md index eec59a5..12a0d73 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,21 @@ # Obsidian Plugin Starter ## Getting Started +If you want to use the `setup-plugin.mjs` script, fill out `plugin-config.yaml` and then make it an executable file. + +```bash +chmod +x setup-plugin.mjs +``` + +When run, it will create the basic metadata and fill in the template variables. If you don't need it, just delete it and happy hacking. + +Run the script with + +```bash +node setup-plugin.mjs +``` + + ``` pnpm install pnpm add -D esbuild @types/node builtin-modules diff --git a/package.json b/package.json index d03d943..319ead0 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,7 @@ "description": "This is starter code for Obsidian plugins (https://obsidian.md)", "main": "main.js", "scripts": { + "setup": "node setup-plugin.mjs", "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" diff --git a/setup-plugin.mjs b/setup-plugin.mjs old mode 100644 new mode 100755