Self-contained Obsidian plugin with built-in development scripts and automated workflows.
This plugin demonstrates the obsidian-plugin-config injection system, making it 100% standalone with all development tools integrated locally.
- ✅ Standalone scripts - All build and automation scripts included locally
- ✅ Hot reload - Automatic rebuild on file changes
- ✅ Dual vault support - Test and production vault configurations
- ✅ Git automation - One-command commit and push
- ✅ Version management - Automated version bumping
- ✅ GitHub releases - Automated release creation
- ✅ Code quality - ESLint + Prettier configured
- ✅ VSCode tasks - Quick access to common commands
- ✅ SASS support - Optional SCSS compilation
git clone https://github.com/3C0D/obsidian-sample-plugin-modif.git
cd obsidian-sample-plugin-modif
yarn installCreate a .env file with your vault paths:
TEST_VAULT=C:\path\to\test\vault
REAL_VAULT=C:\path\to\production\vaultTwo development modes:
-
In-place development (inside vault):
- Develop directly in
.obsidian/plugins/your-plugin - Run
yarn dev- builds automatically to current location
- Develop directly in
-
External development (outside vault):
- Develop anywhere on your system
- Configure
.envwith vault paths - Run
yarn dev- builds to TEST_VAULT - Run
yarn real- builds to REAL_VAULT
yarn start # Install dependencies + start dev
yarn dev # Development build (watch mode)
yarn build # Production build
yarn real # Build + install to real vaultyarn acp # Add, commit, push
yarn bacp # Build + add, commit, pushyarn v # Update version (prompts for type)
yarn r # Create GitHub releaseyarn lint # ESLint check
yarn lint:fix # ESLint fix
yarn prettier # Prettier check
yarn prettier:fix # Prettier format allyarn h # Full help documentationQuick access via Ctrl+Shift+P → "Run Task":
- Build - Production build
- Lint / Lint: Fix - ESLint check/fix
- Prettier: Check / Prettier: Fix - Format check/fix
- Obsidian Inject - Re-inject configuration (with confirmation)
- Obsidian Inject (no confirm) - Re-inject without confirmation
- Cleanup: Lint + Prettier + Build - Full cleanup sequence
💡 Tip: Use Ctrl+Shift+B (Windows/Linux) or Cmd+Shift+B (Mac) for the default Build task.
This plugin can be automatically updated with the latest scripts and configurations:
npm install -g obsidian-plugin-configcd your-plugin
obsidian-inject# With confirmation (default)
obsidian-inject
# Without confirmation
obsidian-inject --no
# Interactive mode (choose what to inject)
obsidian-inject --interactive
# Use preset
obsidian-inject --preset=minimal
# With SASS support
obsidian-inject --sass
# Verification only (no changes)
obsidian-inject --dry-run- ✅ Local scripts (esbuild.config.ts, acp.ts, utils.ts, etc.)
- ✅ package.json (scripts, dependencies)
- ✅ tsconfig.json
- ✅ eslint.config.mts
- ✅ Config files (.editorconfig, .prettierrc, .npmrc, .env)
- ✅ VSCode settings and tasks
- ✅ GitHub Actions workflows
To add SASS/SCSS support:
obsidian-inject --sassWhat SASS injection adds:
- ✅
esbuild-sass-plugindependency - ✅ Automatic compilation of
.scssfiles - ✅ Priority detection:
src/styles.scss>src/styles.css>styles.css - ✅ Automatic cleanup of generated CSS
Usage:
- Create
src/styles.scssinstead ofstyles.css - Use SASS variables, mixins and features
- Build automatically compiles to CSS
All development tools are integrated locally in ./scripts/:
esbuild.config.ts- Build configuration with SASS detectionacp.ts- Git automation (add, commit, push)update-version.ts- Version managementrelease.ts- GitHub release automationutils.ts- Shared utility functionshelp.ts- Help documentation
No external dependencies required - the plugin is 100% standalone after injection.
.injection-info.json tracks:
- Injector version used
- Injection date
- Injector name
This allows checking if updates are available.
yarn start- Install and start development- Make changes, test in Obsidian
yarn bacp- Build and commit changesyarn v- Update versionyarn r- Create release
yarn upgrade # Update all dependencies to latest