obsidian-plugin-config 1.7.3 → 1.7.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -7
- package/bin/obsidian-inject.js +21 -13
- package/docs/INTERACTIVE_INJECTION.md +41 -50
- package/docs/SCSS-FLOW.md +92 -88
- package/package.json +1 -1
- package/scripts/acp.ts +10 -12
- package/scripts/build-npm.ts +397 -393
- package/scripts/help.ts +87 -87
- package/scripts/inject-core.ts +870 -898
- package/scripts/inject-path.ts +157 -156
- package/scripts/inject-prompt.ts +104 -104
- package/scripts/utils.ts +173 -151
- package/templates/.vscode/tasks.json +1 -1
- package/templates/scripts/acp.ts +3 -6
- package/templates/scripts/env.ts +4 -5
- package/templates/scripts/esbuild.config.ts +1 -2
- package/templates/scripts/release.ts +14 -17
- package/templates/scripts/utils.ts +33 -17
- package/docs/audit.md +0 -39
package/scripts/help.ts
CHANGED
|
@@ -1,87 +1,87 @@
|
|
|
1
|
-
#!/usr/bin/env tsx
|
|
2
|
-
|
|
3
|
-
console.log(`
|
|
4
|
-
🎯 Obsidian Plugin Config - Quick Help
|
|
5
|
-
Global CLI injection tool for Obsidian plugins
|
|
6
|
-
|
|
7
|
-
═══════════════════════════════════════════════════════════════════
|
|
8
|
-
|
|
9
|
-
📋 DEVELOPMENT COMMANDS
|
|
10
|
-
|
|
11
|
-
GIT & VERSION:
|
|
12
|
-
yarn acp # Add, commit, push
|
|
13
|
-
yarn v, update-version # Update version
|
|
14
|
-
|
|
15
|
-
LINTING:
|
|
16
|
-
yarn lint, lint:fix # ESLint verification/correction
|
|
17
|
-
|
|
18
|
-
INJECTION (local testing):
|
|
19
|
-
yarn inject-prompt # Interactive injection
|
|
20
|
-
yarn inject-path <path> # Direct injection
|
|
21
|
-
yarn check-plugin <path> # Verification only (dry-run)
|
|
22
|
-
|
|
23
|
-
NPM PUBLISHING:
|
|
24
|
-
yarn npm-publish # Full workflow (5 steps):
|
|
25
|
-
# 1. version bump
|
|
26
|
-
# 2. generate bin
|
|
27
|
-
# 3. verify package
|
|
28
|
-
# 4. commit + push
|
|
29
|
-
# 5. publish to NPM
|
|
30
|
-
|
|
31
|
-
HELP:
|
|
32
|
-
yarn h # This help
|
|
33
|
-
|
|
34
|
-
═══════════════════════════════════════════════════════════════════
|
|
35
|
-
|
|
36
|
-
🏗️ ARCHITECTURE
|
|
37
|
-
|
|
38
|
-
PURE INJECTION TOOL:
|
|
39
|
-
templates/ # Files to inject into target plugins
|
|
40
|
-
scripts/inject-*.ts # Injection logic
|
|
41
|
-
bin/obsidian-inject.js # Global CLI entry point
|
|
42
|
-
|
|
43
|
-
templates/ → what gets injected:
|
|
44
|
-
templates/package.json.template # Base deps/scripts for target plugins
|
|
45
|
-
templates/tsconfig.json.template # TypeScript config
|
|
46
|
-
templates/scripts/* # Scripts copied to target
|
|
47
|
-
templates/eslint.config.mts # ESLint config
|
|
48
|
-
templates/.github/workflows/* # GitHub Actions
|
|
49
|
-
|
|
50
|
-
inject-core.ts — shared injection logic:
|
|
51
|
-
updatePackageJson() # Merges template package.json
|
|
52
|
-
injectScripts() # Copies template files to target
|
|
53
|
-
performInjection() # Main orchestration
|
|
54
|
-
|
|
55
|
-
inject-path.ts — CLI entry point:
|
|
56
|
-
Parses --yes, --dry-run flags
|
|
57
|
-
|
|
58
|
-
inject-prompt.ts — interactive entry:
|
|
59
|
-
Prompts for target path
|
|
60
|
-
|
|
61
|
-
═══════════════════════════════════════════════════════════════════
|
|
62
|
-
|
|
63
|
-
🔧 WORKFLOWS
|
|
64
|
-
|
|
65
|
-
Development:
|
|
66
|
-
1. Make changes to templates/ or scripts/
|
|
67
|
-
2. yarn lint:fix # Fix code issues
|
|
68
|
-
3. yarn npm-publish # Version, commit, publish
|
|
69
|
-
|
|
70
|
-
Global CLI Usage:
|
|
71
|
-
obsidian-inject # Inject in current dir
|
|
72
|
-
obsidian-inject ../my-plugin # Inject by path
|
|
73
|
-
obsidian-inject --help # Show help
|
|
74
|
-
|
|
75
|
-
Local Testing:
|
|
76
|
-
yarn inject-prompt # Interactive
|
|
77
|
-
yarn inject-path ../my-plugin # Direct
|
|
78
|
-
yarn check-plugin ../my-plugin # Dry-run
|
|
79
|
-
|
|
80
|
-
SASS Support (automatic):
|
|
81
|
-
✅ Automatic .scss detection (src/styles.scss priority)
|
|
82
|
-
✅ CSS cleanup after compilation
|
|
83
|
-
💡 Install esbuild-sass-plugin manually if you use SCSS
|
|
84
|
-
|
|
85
|
-
═══════════════════════════════════════════════════════════════════
|
|
86
|
-
|
|
87
|
-
`);
|
|
1
|
+
#!/usr/bin/env tsx
|
|
2
|
+
|
|
3
|
+
console.log(`
|
|
4
|
+
🎯 Obsidian Plugin Config - Quick Help
|
|
5
|
+
Global CLI injection tool for Obsidian plugins
|
|
6
|
+
|
|
7
|
+
═══════════════════════════════════════════════════════════════════
|
|
8
|
+
|
|
9
|
+
📋 DEVELOPMENT COMMANDS
|
|
10
|
+
|
|
11
|
+
GIT & VERSION:
|
|
12
|
+
yarn acp # Add, commit, push
|
|
13
|
+
yarn v, update-version # Update version
|
|
14
|
+
|
|
15
|
+
LINTING:
|
|
16
|
+
yarn lint, lint:fix # ESLint verification/correction
|
|
17
|
+
|
|
18
|
+
INJECTION (local testing):
|
|
19
|
+
yarn inject-prompt # Interactive injection
|
|
20
|
+
yarn inject-path <path> # Direct injection
|
|
21
|
+
yarn check-plugin <path> # Verification only (dry-run)
|
|
22
|
+
|
|
23
|
+
NPM PUBLISHING:
|
|
24
|
+
yarn npm-publish # Full workflow (5 steps):
|
|
25
|
+
# 1. version bump
|
|
26
|
+
# 2. generate bin
|
|
27
|
+
# 3. verify package
|
|
28
|
+
# 4. commit + push
|
|
29
|
+
# 5. publish to NPM
|
|
30
|
+
|
|
31
|
+
HELP:
|
|
32
|
+
yarn h # This help
|
|
33
|
+
|
|
34
|
+
═══════════════════════════════════════════════════════════════════
|
|
35
|
+
|
|
36
|
+
🏗️ ARCHITECTURE
|
|
37
|
+
|
|
38
|
+
PURE INJECTION TOOL:
|
|
39
|
+
templates/ # Files to inject into target plugins
|
|
40
|
+
scripts/inject-*.ts # Injection logic
|
|
41
|
+
bin/obsidian-inject.js # Global CLI entry point
|
|
42
|
+
|
|
43
|
+
templates/ → what gets injected:
|
|
44
|
+
templates/package.json.template # Base deps/scripts for target plugins
|
|
45
|
+
templates/tsconfig.json.template # TypeScript config
|
|
46
|
+
templates/scripts/* # Scripts copied to target
|
|
47
|
+
templates/eslint.config.mts # ESLint config
|
|
48
|
+
templates/.github/workflows/* # GitHub Actions
|
|
49
|
+
|
|
50
|
+
inject-core.ts — shared injection logic:
|
|
51
|
+
updatePackageJson() # Merges template package.json
|
|
52
|
+
injectScripts() # Copies template files to target
|
|
53
|
+
performInjection() # Main orchestration
|
|
54
|
+
|
|
55
|
+
inject-path.ts — CLI entry point:
|
|
56
|
+
Parses --yes, --dry-run flags
|
|
57
|
+
|
|
58
|
+
inject-prompt.ts — interactive entry:
|
|
59
|
+
Prompts for target path
|
|
60
|
+
|
|
61
|
+
═══════════════════════════════════════════════════════════════════
|
|
62
|
+
|
|
63
|
+
🔧 WORKFLOWS
|
|
64
|
+
|
|
65
|
+
Development:
|
|
66
|
+
1. Make changes to templates/ or scripts/
|
|
67
|
+
2. yarn lint:fix # Fix code issues
|
|
68
|
+
3. yarn npm-publish # Version, commit, publish
|
|
69
|
+
|
|
70
|
+
Global CLI Usage:
|
|
71
|
+
obsidian-inject # Inject in current dir
|
|
72
|
+
obsidian-inject ../my-plugin # Inject by path
|
|
73
|
+
obsidian-inject --help # Show help
|
|
74
|
+
|
|
75
|
+
Local Testing:
|
|
76
|
+
yarn inject-prompt # Interactive
|
|
77
|
+
yarn inject-path ../my-plugin # Direct
|
|
78
|
+
yarn check-plugin ../my-plugin # Dry-run
|
|
79
|
+
|
|
80
|
+
SASS Support (automatic):
|
|
81
|
+
✅ Automatic .scss detection (src/styles.scss priority)
|
|
82
|
+
✅ CSS cleanup after compilation
|
|
83
|
+
💡 Install esbuild-sass-plugin manually if you use SCSS
|
|
84
|
+
|
|
85
|
+
═══════════════════════════════════════════════════════════════════
|
|
86
|
+
|
|
87
|
+
`);
|