@mnaoumov/create-obsidian-plugin 1.0.1 → 1.1.0

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.
Files changed (490) hide show
  1. package/README.md +38 -7
  2. package/dist/main.js +1068 -333
  3. package/package.json +15 -6
  4. package/src/main.ts +118 -11
  5. package/templates/default/.github/ISSUE_TEMPLATE/config.yml.ejs +4 -0
  6. package/templates/default/.github/workflows/attest-release-assets.yml.ejs +1 -11
  7. package/templates/default/.github/workflows/ci.yml_framework.ejs +19 -0
  8. package/templates/default/.github/workflows/ci.yml_framework@job-permissions_measured-coverage-badge.ejs +3 -0
  9. package/templates/default/.github/workflows/ci.yml_framework@with_measured-coverage-badge.ejs +1 -0
  10. package/templates/default/.github/workflows/{ci.yml.ejs → ci.yml_standalone.ejs} +1 -1
  11. package/templates/default/.github/workflows/release.yml_framework.ejs +19 -0
  12. package/templates/default/.github/workflows/{release.yml.ejs → release.yml_standalone.ejs} +1 -1
  13. package/templates/default/.gitignore_common.ejs +1 -0
  14. package/templates/default/.gitignore_wdio-obsidian.ejs +2 -0
  15. package/templates/default/.nvmrc.ejs +1 -0
  16. package/templates/default/.prettierignore.ejs +1 -0
  17. package/templates/default/.prettierignore@ignores_docs-showcase.ejs +3 -0
  18. package/templates/default/{CONTRIBUTING.md@demo-vault_dev-utils.ejs → CONTRIBUTING.md@demo-vault_framework.ejs} +1 -1
  19. package/templates/default/{README.md@demo-vault_dev-utils.ejs → README.md@demo-vault_framework.ejs} +1 -1
  20. package/templates/default/README.md@preset_docs-showcase.ejs +4 -0
  21. package/templates/default/{README.md@preset_dev-utils.ejs → README.md@preset_framework.ejs} +1 -1
  22. package/templates/default/biome.jsonc_framework.ejs +16 -0
  23. package/templates/default/biome.jsonc_framework@excludes_docs-showcase.ejs +1 -0
  24. package/templates/default/{biome.jsonc.ejs → biome.jsonc_standalone.ejs} +1 -1
  25. package/templates/default/cspell.json.ejs +10 -2
  26. package/templates/default/cspell.json@ignore-paths_docs-showcase.ejs +1 -0
  27. package/templates/default/demo-vault/.gitignore.ejs +4 -4
  28. package/templates/default/demo-vault/00 Start.md.ejs +1 -1
  29. package/templates/default/demo-vault/01 Sample commands.md.ejs +4 -4
  30. package/templates/default/demo-vault/02 Settings.md.ejs +2 -2
  31. package/templates/default/demo-vault/03 WebAssembly.md.ejs +2 -2
  32. package/templates/default/demo-vault/README.md.ejs +1 -1
  33. package/templates/default/demo-vault/_assets/CodeScriptToolkit/demoSetup.ts.ejs +1 -1
  34. package/templates/default/demo-vault/_assets/CodeScriptToolkit/startup.ts.ejs +4 -4
  35. package/templates/default/dprint.json_framework.ejs +10 -0
  36. package/templates/default/dprint.json_framework@excludes_docs-showcase.ejs +2 -0
  37. package/templates/default/dprint.json_standalone.ejs +1 -0
  38. package/templates/default/eslint.config.mts_standalone.ejs +9 -0
  39. package/templates/default/jest.config.ts_framework.ejs +31 -0
  40. package/templates/default/{scripts/rollup.config.ts@lint-out-dir_dev-utils.ejs → jest.config.ts_framework@lint-root-dir_framework.ejs} +1 -1
  41. package/templates/default/jest.config.ts_framework@ts-jest-tsconfig_solid.ejs +8 -0
  42. package/templates/default/{jest.config.ts.ejs → jest.config.ts_standalone.ejs} +0 -1
  43. package/templates/default/package.json@targets_parcel-targets.ejs +31 -0
  44. package/templates/default/package.json@targets_parcel.ejs +2 -33
  45. package/templates/default/parcel-transformer-inline-imports.cjs.ejs +1 -1
  46. package/templates/default/prettier.config.mjs_framework.ejs +3 -0
  47. package/templates/default/scripts/build-clean.ts.ejs +2 -2
  48. package/templates/default/scripts/build-compile-typescript.ts.ejs +14 -0
  49. package/templates/default/scripts/build-compile.ts.ejs +2 -2
  50. package/templates/default/scripts/build-options.ts.ejs +9 -0
  51. package/templates/default/scripts/build-styles.ts.ejs +4 -7
  52. package/templates/default/scripts/build.ts.ejs +2 -2
  53. package/templates/default/scripts/build.ts@bundler_adapter-cli.ejs +11 -0
  54. package/templates/default/scripts/build.ts@bundler_adapter-cli@run_rollup.ejs +1 -0
  55. package/templates/default/scripts/build.ts@bundler_adapter-cli@run_vite.ejs +1 -0
  56. package/templates/default/scripts/build.ts@bundler_adapter-cli@run_webpack.ejs +1 -0
  57. package/templates/default/scripts/build.ts@bundler_cli-bundler.ejs +1 -1
  58. package/templates/default/scripts/build.ts@bundler_cli-bundler@import_tailwind.ejs +0 -1
  59. package/templates/default/scripts/build.ts@bundler_esbuild.ejs +2 -2
  60. package/templates/default/scripts/build.ts@bundler_esbuild@preset_framework.ejs +5 -0
  61. package/templates/default/scripts/build.ts@bundler_parcel-adapter.ejs +5 -0
  62. package/templates/default/scripts/commit.ts_framework.ejs +3 -0
  63. package/templates/default/scripts/commitlint-config.ts_framework.ejs +1 -0
  64. package/templates/default/scripts/demo-vault-global-setup.ts.ejs +7 -4
  65. package/templates/default/scripts/dev.ts.ejs +1 -1
  66. package/templates/default/scripts/dev.ts@bundler_adapter-cli.ejs +6 -0
  67. package/templates/default/scripts/dev.ts@bundler_adapter-cli@run_rollup.ejs +3 -0
  68. package/templates/default/scripts/dev.ts@bundler_adapter-cli@run_vite.ejs +3 -0
  69. package/templates/default/scripts/dev.ts@bundler_adapter-cli@run_webpack.ejs +3 -0
  70. package/templates/default/scripts/dev.ts@bundler_esbuild.ejs +2 -2
  71. package/templates/default/scripts/dev.ts@bundler_esbuild@preset_framework.ejs +5 -0
  72. package/templates/default/scripts/dev.ts@bundler_parcel-adapter.ejs +5 -0
  73. package/templates/default/scripts/eslint-config.ts.ejs +3 -14
  74. package/templates/default/scripts/eslint-config.ts@ignores_docs-showcase.ejs +4 -0
  75. package/templates/default/scripts/find-overexposed-fix.ts.ejs +4 -4
  76. package/templates/default/scripts/find-overexposed.ts.ejs +3 -3
  77. package/templates/default/scripts/format-check.ts@tool_biome-formatter.ejs +3 -8
  78. package/templates/default/scripts/format-check.ts@tool_biome-formatter@preset_framework.ejs +7 -0
  79. package/templates/default/scripts/format-check.ts@tool_biome-formatter@preset_standalone.ejs +8 -0
  80. package/templates/default/scripts/format-check.ts@tool_dprint.ejs +2 -2
  81. package/templates/default/scripts/format-check.ts@tool_dprint@preset_framework.ejs +7 -0
  82. package/templates/default/scripts/format-check.ts@tool_prettier.ejs +3 -8
  83. package/templates/default/scripts/format-check.ts@tool_prettier@preset_framework.ejs +7 -0
  84. package/templates/default/scripts/format-check.ts@tool_prettier@preset_standalone.ejs +8 -0
  85. package/templates/default/scripts/format.ts@tool_biome-formatter.ejs +3 -8
  86. package/templates/default/scripts/format.ts@tool_biome-formatter@preset_framework.ejs +7 -0
  87. package/templates/default/scripts/format.ts@tool_biome-formatter@preset_standalone.ejs +8 -0
  88. package/templates/default/scripts/format.ts@tool_dprint.ejs +2 -2
  89. package/templates/default/scripts/format.ts@tool_dprint@preset_framework.ejs +7 -0
  90. package/templates/default/scripts/format.ts@tool_prettier.ejs +3 -8
  91. package/templates/default/scripts/format.ts@tool_prettier@preset_framework.ejs +7 -0
  92. package/templates/default/scripts/format.ts@tool_prettier@preset_standalone.ejs +8 -0
  93. package/templates/default/scripts/gate.ts.ejs +3 -3
  94. package/templates/default/scripts/lint-fix.ts.ejs +2 -2
  95. package/templates/default/scripts/lint-fix.ts@tool_biome-linter.ejs +3 -8
  96. package/templates/default/scripts/lint-fix.ts@tool_biome-linter@preset_framework.ejs +7 -0
  97. package/templates/default/scripts/lint-fix.ts@tool_biome-linter@preset_standalone.ejs +8 -0
  98. package/templates/default/scripts/lint-fix.ts@tool_eslint.ejs +2 -2
  99. package/templates/default/scripts/lint-fix.ts@tool_eslint@preset_framework.ejs +7 -0
  100. package/templates/default/scripts/lint-md-fix.ts_framework.ejs +7 -0
  101. package/templates/default/scripts/lint-md.ts_framework.ejs +7 -0
  102. package/templates/default/scripts/lint.ts.ejs +2 -2
  103. package/templates/default/scripts/lint.ts@tool_biome-linter.ejs +3 -8
  104. package/templates/default/scripts/lint.ts@tool_biome-linter@preset_framework.ejs +7 -0
  105. package/templates/default/scripts/lint.ts@tool_biome-linter@preset_standalone.ejs +8 -0
  106. package/templates/default/scripts/lint.ts@tool_eslint.ejs +2 -2
  107. package/templates/default/scripts/lint.ts@tool_eslint@preset_framework.ejs +7 -0
  108. package/templates/default/scripts/{markdownlint-cli2-config.ts_dev-utils.ejs → markdownlint-cli2-config.ts_framework.ejs} +4 -4
  109. package/templates/default/scripts/markdownlint-cli2-config.ts_standalone.ejs +0 -3
  110. package/templates/default/scripts/nano-staged-config.ts_toolkit-nano-staged.ejs +3 -0
  111. package/templates/default/scripts/prepare.ts_framework.ejs +3 -0
  112. package/templates/default/scripts/rollup.config.ts_framework.ejs +49 -0
  113. package/templates/default/scripts/rollup.config.ts_framework@plugin_rollup-json.ejs +2 -0
  114. package/templates/default/scripts/rollup.config.ts_framework@plugin_scss.ejs +3 -0
  115. package/templates/default/scripts/{rollup.config.ts.ejs → rollup.config.ts_standalone.ejs} +4 -4
  116. package/templates/default/scripts/rollup.config.ts_standalone@import_rollup-json.ejs +1 -0
  117. package/templates/default/scripts/rollup.config.ts_standalone@import_scss.ejs +1 -0
  118. package/templates/default/scripts/rollup.config.ts_standalone@unwrap_rollup-json.ejs +1 -0
  119. package/templates/default/scripts/rollup.config.ts_standalone@unwrap_scss.ejs +1 -0
  120. package/templates/default/scripts/spellcheck.ts_framework.ejs +7 -0
  121. package/templates/default/scripts/stylesheet-stub.ts.ejs +1 -1
  122. package/templates/default/scripts/test-coverage.ts.ejs +2 -8
  123. package/templates/default/scripts/test-coverage.ts@tool_jest.ejs +5 -0
  124. package/templates/default/scripts/test-coverage.ts@tool_vitest.ejs +8 -0
  125. package/templates/default/scripts/test-e2e.ts@tool_obsidian-test.ejs +2 -8
  126. package/templates/default/scripts/test-e2e.ts@tool_obsidian-test@preset_framework.ejs +4 -0
  127. package/templates/default/scripts/test-e2e.ts@tool_obsidian-test@preset_standalone.ejs +8 -0
  128. package/templates/default/scripts/test-e2e.ts@tool_wdio-obsidian.ejs +2 -8
  129. package/templates/default/scripts/test-e2e.ts@tool_wdio-obsidian@preset_framework.ejs +5 -0
  130. package/templates/default/scripts/test-e2e.ts@tool_wdio-obsidian@preset_standalone.ejs +8 -0
  131. package/templates/default/scripts/test-integration-android.ts.ejs +2 -2
  132. package/templates/default/scripts/test-integration-demo-vault.ts.ejs +2 -2
  133. package/templates/default/scripts/test-integration-desktop-performance.ts.ejs +2 -2
  134. package/templates/default/scripts/test-integration-desktop.ts.ejs +2 -2
  135. package/templates/default/scripts/test-integration-no-app.ts.ejs +2 -2
  136. package/templates/default/scripts/test-integration.ts.ejs +2 -2
  137. package/templates/default/scripts/test-watch.ts_framework@tool_jest.ejs +5 -0
  138. package/templates/default/scripts/test-watch.ts_framework@tool_vitest.ejs +8 -0
  139. package/templates/default/scripts/test.ts_framework@tool_jest.ejs +5 -0
  140. package/templates/default/scripts/test.ts_framework@tool_vitest.ejs +8 -0
  141. package/templates/default/scripts/{version.ts_dev-utils.ejs → version.ts_framework.ejs} +3 -3
  142. package/templates/default/scripts/vite.config.ts_framework.ejs +10 -0
  143. package/templates/default/scripts/{vite.config.ts.ejs → vite.config.ts_standalone.ejs} +5 -8
  144. package/templates/default/scripts/vitest-config.ts.ejs +3 -2
  145. package/templates/default/scripts/vitest-config.ts@edit-context_docs-showcase.ejs +3 -0
  146. package/templates/default/scripts/webpack.config.ts_framework.ejs +19 -0
  147. package/templates/default/scripts/webpack.config.ts_framework@import_scss.ejs +1 -0
  148. package/templates/default/scripts/webpack.config.ts_framework@plugin_scss.ejs +1 -0
  149. package/templates/default/scripts/webpack.config.ts_framework@rule_scss.ejs +4 -0
  150. package/templates/default/scripts/{webpack.config.ts.ejs → webpack.config.ts_standalone.ejs} +4 -4
  151. package/templates/default/src/demo-vault-buttons.demo-vault.integration.test.ts.ejs +2 -2
  152. package/templates/default/src/demo-vault.no-app.integration.test.ts.ejs +3 -3
  153. package/templates/default/src/docs-showcase.desktop.integration.test.ts.ejs +77 -0
  154. package/templates/default/src/editor-extensions/{sample-state-field.ts_dev-utils.ejs → sample-state-field.ts_framework.ejs} +1 -1
  155. package/templates/default/src/main.ts@import_tailwind.ejs +1 -1
  156. package/templates/default/src/main.ts@import_tailwind@preset_framework.ejs +1 -0
  157. package/templates/default/src/main.ts@import_tailwind@preset_standalone.ejs +1 -0
  158. package/templates/default/src/{plugin-settings-component.test.ts_enhanced.ejs → plugin-settings-component.test.ts_all-in-one.ejs} +4 -4
  159. package/templates/default/src/plugin-settings-component.test.ts_demo.ejs +5 -5
  160. package/templates/default/src/{plugin-settings-component.ts_enhanced.ejs → plugin-settings-component.ts_all-in-one.ejs} +3 -3
  161. package/templates/default/src/plugin-settings-component.ts_demo.ejs +7 -7
  162. package/templates/default/src/{plugin-settings-tab.ts_enhanced.ejs → plugin-settings-tab.ts_all-in-one.ejs} +1 -1
  163. package/templates/default/src/plugin-settings-tab.ts_demo.ejs +3 -3
  164. package/templates/default/src/plugin-settings.ts_demo.ejs +2 -2
  165. package/templates/default/src/{plugin.ts_enhanced.ejs → plugin.ts_all-in-one.ejs} +5 -5
  166. package/templates/default/src/plugin.ts_all-in-one@import2_css-modules.ejs +1 -0
  167. package/templates/default/src/plugin.ts_all-in-one@import2_docs-showcase.ejs +1 -0
  168. package/templates/default/src/plugin.ts_all-in-one@onload_css-modules.ejs +1 -0
  169. package/templates/default/src/plugin.ts_all-in-one@onload_docs-showcase.ejs +3 -0
  170. package/templates/default/src/plugin.ts_demo.ejs +16 -16
  171. package/templates/default/src/plugin.ts_demo@import_css-modules.ejs +1 -0
  172. package/templates/default/src/plugin.ts_demo@onload_css-modules.ejs +1 -0
  173. package/templates/default/src/plugin.ts_standalone.ejs +5 -3
  174. package/templates/default/src/plugin.ts_standalone@import_css-modules.ejs +1 -0
  175. package/templates/default/src/plugin.ts_standalone@onload_css-modules.ejs +1 -0
  176. package/templates/default/src/react-components/{sample-react-component.tsx_dev-utils.ejs → sample-react-component.tsx_framework.ejs} +1 -1
  177. package/templates/default/src/styles/css-modules.d.ts.ejs +9 -3
  178. package/templates/default/src/styles/{main.css_dev-utils.ejs → main.css_framework.ejs} +2 -2
  179. package/templates/default/src/styles/main.module.css.ejs +4 -2
  180. package/templates/default/src/styles/{main.scss_dev-utils.ejs → main.scss_framework.ejs} +2 -2
  181. package/templates/default/src/styles/sample-css-module-command.ts.ejs +30 -0
  182. package/templates/default/src/views/{sample-react-view.tsx_dev-utils.ejs → sample-react-view.tsx_framework.ejs} +1 -1
  183. package/templates/default/src/wasm/README.md.ejs +1 -1
  184. package/templates/default/src/wasm/answer.ts_wasm-adapter.ejs +18 -0
  185. package/templates/default/{tsconfig.json_dev-utils.ejs → tsconfig.json_framework.ejs} +2 -2
  186. package/templates/default/tsconfig.json_framework@exclude_docs-showcase.ejs +4 -0
  187. package/templates/default/tsconfig.json_framework@include_wdio-obsidian.ejs +1 -0
  188. package/templates/default/tsconfig.json_framework@types_toolkit-styles.ejs +2 -0
  189. package/templates/default/tsconfig.json_framework@types_wasm.ejs +2 -0
  190. package/templates/default/tsconfig.json_standalone.ejs +1 -1
  191. package/templates/default/vitest.config.ts_standalone.ejs +11 -2
  192. package/templates/default/wdio.conf.mts.ejs +5 -0
  193. package/templates/default/wdio.conf.ts.ejs +4 -4
  194. package/templates/docs-showcase/files/src/docs/README.md +511 -0
  195. package/templates/docs-showcase/files/src/docs/entry.d.ts +8 -0
  196. package/templates/docs-showcase/files/src/docs/entry.js +4 -0
  197. package/templates/docs-showcase/files/src/docs/host.ts +449 -0
  198. package/templates/docs-showcase/files/src/docs/index.ts +699 -0
  199. package/templates/docs-showcase/files/src/docs/plugins/editor/communicating-with-editor-extensions/01-intro.ts +21 -0
  200. package/templates/docs-showcase/files/src/docs/plugins/editor/communicating-with-editor-extensions/03-state-field.ts +32 -0
  201. package/templates/docs-showcase/files/src/docs/plugins/editor/decorations/01-widgets.ts +23 -0
  202. package/templates/docs-showcase/files/src/docs/plugins/editor/decorations/02-widgets.ts +20 -0
  203. package/templates/docs-showcase/files/src/docs/plugins/editor/decorations/04-state-fields.ts +57 -0
  204. package/templates/docs-showcase/files/src/docs/plugins/editor/decorations/05-view-plugins.ts +79 -0
  205. package/templates/docs-showcase/files/src/docs/plugins/editor/editor/01-intro.ts +26 -0
  206. package/templates/docs-showcase/files/src/docs/plugins/editor/editor/03-replace-current-selection.ts +26 -0
  207. package/templates/docs-showcase/files/src/docs/plugins/editor/markdown-post-processing/01-intro.ts +39 -0
  208. package/templates/docs-showcase/files/src/docs/plugins/editor/state-fields/01-defining-state-effects.ts +19 -0
  209. package/templates/docs-showcase/files/src/docs/plugins/editor/state-fields/02-defining-a-state-field.ts +35 -0
  210. package/templates/docs-showcase/files/src/docs/plugins/editor/state-fields/04-dispatching-state-effects.ts +34 -0
  211. package/templates/docs-showcase/files/src/docs/plugins/editor/state-management/01-state-changes.ts +21 -0
  212. package/templates/docs-showcase/files/src/docs/plugins/editor/state-management/02-state-changes.ts +23 -0
  213. package/templates/docs-showcase/files/src/docs/plugins/editor/view-plugins/01-creating-a-view-plugin.ts +36 -0
  214. package/templates/docs-showcase/files/src/docs/plugins/events/01-intro.ts +21 -0
  215. package/templates/docs-showcase/files/src/docs/plugins/getting-started/anatomy-of-a-plugin/01-intro.ts +22 -0
  216. package/templates/docs-showcase/files/src/docs/plugins/getting-started/anatomy-of-a-plugin/02-plugin-lifecycle.ts +22 -0
  217. package/templates/docs-showcase/files/src/docs/plugins/getting-started/build-a-plugin/06-step-5-update-the-source-code.ts +19 -0
  218. package/templates/docs-showcase/files/src/docs/plugins/getting-started/build-a-plugin/07-step-5-update-the-source-code.ts +21 -0
  219. package/templates/docs-showcase/files/src/docs/plugins/getting-started/mobile-development/03-platform-specific-features.ts +25 -0
  220. package/templates/docs-showcase/files/src/docs/plugins/getting-started/use-react-in-your-plugin/03-configure-your-plugin.ts +23 -0
  221. package/templates/docs-showcase/files/src/docs/plugins/guides/build-a-bases-view/01-step-1-sample-plugin-setup.ts +18 -0
  222. package/templates/docs-showcase/files/src/docs/plugins/guides/build-a-bases-view/02-step-2-create-and-register-the-bases-vie.ts +46 -0
  223. package/templates/docs-showcase/files/src/docs/plugins/guides/build-a-bases-view/03-step-3-add-configuration.ts +40 -0
  224. package/templates/docs-showcase/files/src/docs/plugins/guides/defer-views/04-accessing-your-customview-without-reveal.ts +26 -0
  225. package/templates/docs-showcase/files/src/docs/plugins/guides/manage-plugin-lifecycle/01-overview.ts +26 -0
  226. package/templates/docs-showcase/files/src/docs/plugins/guides/manage-plugin-lifecycle/02-overview.ts +30 -0
  227. package/templates/docs-showcase/files/src/docs/plugins/guides/manage-plugin-lifecycle/03-automatic-resource-management-with-compo.ts +26 -0
  228. package/templates/docs-showcase/files/src/docs/plugins/guides/manage-plugin-lifecycle/04-registerevent-eventref.ts +22 -0
  229. package/templates/docs-showcase/files/src/docs/plugins/guides/manage-plugin-lifecycle/05-registerinterval-id.ts +21 -0
  230. package/templates/docs-showcase/files/src/docs/plugins/guides/manage-plugin-lifecycle/06-registerdomevent-el-event-handler.ts +20 -0
  231. package/templates/docs-showcase/files/src/docs/plugins/guides/manage-plugin-lifecycle/08-understanding-the-lifecycle-of-objects.ts +29 -0
  232. package/templates/docs-showcase/files/src/docs/plugins/guides/manage-plugin-lifecycle/14-componentized-modal-example.ts +37 -0
  233. package/templates/docs-showcase/files/src/docs/plugins/guides/optimize-plugin-load-time/01-option-a-check-if-the-layout-is-ready.ts +29 -0
  234. package/templates/docs-showcase/files/src/docs/plugins/guides/optimize-plugin-load-time/02-option-b-register-the-handler-once-the-l.ts +27 -0
  235. package/templates/docs-showcase/files/src/docs/plugins/guides/store-secrets/03-step-3-retrieve-the-secret-value.ts +22 -0
  236. package/templates/docs-showcase/files/src/docs/plugins/releasing/plugin-guidelines/01-use-setheading-instead-of-a-h1-h2.ts +20 -0
  237. package/templates/docs-showcase/files/src/docs/plugins/releasing/plugin-guidelines/03-clean-up-resources-when-plugin-unloads.ts +23 -0
  238. package/templates/docs-showcase/files/src/docs/plugins/releasing/plugin-guidelines/04-avoid-accessing-workspace-activeleaf-dir.ts +24 -0
  239. package/templates/docs-showcase/files/src/docs/plugins/releasing/plugin-guidelines/05-avoid-accessing-workspace-activeleaf-dir.ts +22 -0
  240. package/templates/docs-showcase/files/src/docs/plugins/releasing/plugin-guidelines/10-avoid-iterating-all-files-to-find-a-file.ts +20 -0
  241. package/templates/docs-showcase/files/src/docs/plugins/releasing/plugin-guidelines/11-avoid-iterating-all-files-to-find-a-file.ts +20 -0
  242. package/templates/docs-showcase/files/src/docs/plugins/releasing/plugin-guidelines/13-use-normalizepath-to-clean-up-user-defin.ts +18 -0
  243. package/templates/docs-showcase/files/src/docs/plugins/releasing/plugin-guidelines/15-no-hardcoded-styling.ts +21 -0
  244. package/templates/docs-showcase/files/src/docs/plugins/releasing/plugin-guidelines/16-no-hardcoded-styling.ts +19 -0
  245. package/templates/docs-showcase/files/src/docs/plugins/releasing/plugin-guidelines/17-no-hardcoded-styling.ts +14 -0
  246. package/templates/docs-showcase/files/src/docs/plugins/releasing/plugin-guidelines/18-prefer-async-await-over-promise.ts +24 -0
  247. package/templates/docs-showcase/files/src/docs/plugins/releasing/plugin-guidelines/19-prefer-async-await-over-promise.ts +27 -0
  248. package/templates/docs-showcase/files/src/docs/plugins/user-interface/commands/01-intro.ts +25 -0
  249. package/templates/docs-showcase/files/src/docs/plugins/user-interface/commands/03-editor-commands.ts +27 -0
  250. package/templates/docs-showcase/files/src/docs/plugins/user-interface/commands/05-hot-keys.ts +25 -0
  251. package/templates/docs-showcase/files/src/docs/plugins/user-interface/context-menus/01-intro.ts +41 -0
  252. package/templates/docs-showcase/files/src/docs/plugins/user-interface/html-elements/02-create-html-elements-using-createel.ts +19 -0
  253. package/templates/docs-showcase/files/src/docs/plugins/user-interface/html-elements/03-create-html-elements-using-createel.ts +21 -0
  254. package/templates/docs-showcase/files/src/docs/plugins/user-interface/html-elements/04-style-your-elements.ts +14 -0
  255. package/templates/docs-showcase/files/src/docs/plugins/user-interface/html-elements/05-style-your-elements.ts +21 -0
  256. package/templates/docs-showcase/files/src/docs/plugins/user-interface/html-elements/06-conditional-styles.ts +19 -0
  257. package/templates/docs-showcase/files/src/docs/plugins/user-interface/icons/01-use-icons.ts +20 -0
  258. package/templates/docs-showcase/files/src/docs/plugins/user-interface/icons/02-use-icons.ts +14 -0
  259. package/templates/docs-showcase/files/src/docs/plugins/user-interface/icons/03-add-your-own-icon.ts +23 -0
  260. package/templates/docs-showcase/files/src/docs/plugins/user-interface/modals/01-intro.ts +20 -0
  261. package/templates/docs-showcase/files/src/docs/plugins/user-interface/modals/02-intro.ts +26 -0
  262. package/templates/docs-showcase/files/src/docs/plugins/user-interface/modals/03-accept-user-input.ts +38 -0
  263. package/templates/docs-showcase/files/src/docs/plugins/user-interface/modals/04-accept-user-input.ts +22 -0
  264. package/templates/docs-showcase/files/src/docs/plugins/user-interface/modals/05-select-from-list-of-suggestions.ts +56 -0
  265. package/templates/docs-showcase/files/src/docs/plugins/user-interface/modals/06-approximate-string-matching-results.ts +28 -0
  266. package/templates/docs-showcase/files/src/docs/plugins/user-interface/modals/07-custom-rendering-of-fuzzy-search-results.ts +41 -0
  267. package/templates/docs-showcase/files/src/docs/plugins/user-interface/ribbon-actions/01-intro.ts +21 -0
  268. package/templates/docs-showcase/files/src/docs/plugins/user-interface/right-to-left/01-use-fallback-values-when-necessary.ts +14 -0
  269. package/templates/docs-showcase/files/src/docs/plugins/user-interface/right-to-left/02-global-selectors.ts +14 -0
  270. package/templates/docs-showcase/files/src/docs/plugins/user-interface/right-to-left/03-icons-are-mirrored-automatically.ts +14 -0
  271. package/templates/docs-showcase/files/src/docs/plugins/user-interface/settings/09-toggle.ts +20 -0
  272. package/templates/docs-showcase/files/src/docs/plugins/user-interface/settings/10-text.ts +23 -0
  273. package/templates/docs-showcase/files/src/docs/plugins/user-interface/settings/11-textarea.ts +23 -0
  274. package/templates/docs-showcase/files/src/docs/plugins/user-interface/settings/12-number.ts +23 -0
  275. package/templates/docs-showcase/files/src/docs/plugins/user-interface/settings/13-slider.ts +23 -0
  276. package/templates/docs-showcase/files/src/docs/plugins/user-interface/settings/14-dropdown.ts +28 -0
  277. package/templates/docs-showcase/files/src/docs/plugins/user-interface/settings/15-file.ts +27 -0
  278. package/templates/docs-showcase/files/src/docs/plugins/user-interface/settings/16-folder.ts +23 -0
  279. package/templates/docs-showcase/files/src/docs/plugins/user-interface/settings/17-color-picker.ts +20 -0
  280. package/templates/docs-showcase/files/src/docs/plugins/user-interface/settings/18-validating-input.ts +28 -0
  281. package/templates/docs-showcase/files/src/docs/plugins/user-interface/settings/23-groups.ts +27 -0
  282. package/templates/docs-showcase/files/src/docs/plugins/user-interface/settings/32-cleanup.ts +30 -0
  283. package/templates/docs-showcase/files/src/docs/plugins/user-interface/settings/33-no-top-level-heading.ts +27 -0
  284. package/templates/docs-showcase/files/src/docs/plugins/user-interface/settings/34-headings-only-when-there-are-multiple-se.ts +26 -0
  285. package/templates/docs-showcase/files/src/docs/plugins/user-interface/settings/36-headings.ts +20 -0
  286. package/templates/docs-showcase/files/src/docs/plugins/user-interface/settings/38-moment-format.ts +42 -0
  287. package/templates/docs-showcase/files/src/docs/plugins/user-interface/settings/39-buttons.ts +26 -0
  288. package/templates/docs-showcase/files/src/docs/plugins/user-interface/settings/40-extra-button.ts +28 -0
  289. package/templates/docs-showcase/files/src/docs/plugins/user-interface/settings/41-progress-bar.ts +23 -0
  290. package/templates/docs-showcase/files/src/docs/plugins/user-interface/status-bar/01-intro.ts +20 -0
  291. package/templates/docs-showcase/files/src/docs/plugins/user-interface/status-bar/02-intro.ts +25 -0
  292. package/templates/docs-showcase/files/src/docs/plugins/user-interface/views/01-intro.ts +39 -0
  293. package/templates/docs-showcase/files/src/docs/plugins/user-interface/workspace/05-inspect-the-workspace.ts +23 -0
  294. package/templates/docs-showcase/files/src/docs/plugins/user-interface/workspace/06-leaf-groups.ts +19 -0
  295. package/templates/docs-showcase/files/src/docs/plugins/vault/02-read-files.ts +37 -0
  296. package/templates/docs-showcase/files/src/docs/plugins/vault/03-modify-files.ts +19 -0
  297. package/templates/docs-showcase/files/src/docs/plugins/vault/04-modify-files.ts +22 -0
  298. package/templates/docs-showcase/files/src/docs/plugins/vault/05-is-it-a-file-or-folder.ts +25 -0
  299. package/templates/docs-showcase/files/src/docs/reference/css-variables/about-styling/01-for-plugins.ts +14 -0
  300. package/templates/docs-showcase/files/src/docs/reference/css-variables/about-styling/02-for-themes-and-snippets.ts +14 -0
  301. package/templates/docs-showcase/files/src/docs/reference/css-variables/publish/site-fonts/01-intro.ts +14 -0
  302. package/templates/docs-showcase/files/src/docs/reference/typescript-api/command/callback/01-example.ts +24 -0
  303. package/templates/docs-showcase/files/src/docs/reference/typescript-api/debounce/01-example.ts +24 -0
  304. package/templates/docs-showcase/files/src/docs/reference/typescript-api/vault/process/01-example.ts +22 -0
  305. package/templates/docs-showcase/files/src/docs/themes/app-themes/build-a-theme/05-step-4-change-the-font.ts +14 -0
  306. package/templates/docs-showcase/files/src/docs/themes/app-themes/build-a-theme/06-step-5-change-the-background-color.ts +14 -0
  307. package/templates/docs-showcase/files/src/docs/themes/app-themes/build-a-theme/07-step-6-change-the-input-hover-border-col.ts +14 -0
  308. package/templates/docs-showcase/files/src/docs/themes/app-themes/build-a-theme/08-step-7-discover-css-variables-in-use.ts +14 -0
  309. package/templates/docs-showcase/files/src/docs/themes/app-themes/embed-fonts-and-images-in-your-theme/02-use-data-urls.ts +14 -0
  310. package/templates/docs-showcase/files/src/docs/themes/app-themes/theme-guidelines/01-use-css-variables.ts +14 -0
  311. package/templates/docs-showcase/files/src/docs/themes/obsidian-publish-themes/best-practices-for-publish-themes/01-small-screens-and-mobile-devices.ts +14 -0
  312. package/templates/docs-showcase/files/src/docs/themes/obsidian-publish-themes/build-a-publish-theme/01-intro.ts +14 -0
  313. package/templates/docs-showcase/files/src/docs/tsconfig.json +25 -0
  314. package/templates/docs-showcase/host/entry.d.ts +8 -0
  315. package/templates/docs-showcase/host/entry.js +4 -0
  316. package/templates/docs-showcase/host/host.ts +449 -0
  317. package/templates/docs-showcase/host/tsconfig.json +25 -0
  318. package/templates/docs-showcase/snippets.json +3566 -0
  319. package/templates/official-sample/README.md +9 -0
  320. package/templates/official-sample/files/.editorconfig.vendored +11 -0
  321. package/templates/official-sample/files/.github/workflows/lint.yml.vendored +27 -0
  322. package/templates/official-sample/files/.github/workflows/release.yml.vendored +50 -0
  323. package/templates/official-sample/files/.gitignore.vendored +22 -0
  324. package/templates/official-sample/files/.npmrc.vendored +1 -0
  325. package/templates/official-sample/files/AGENTS.md.vendored +269 -0
  326. package/templates/official-sample/files/LICENSE.vendored +5 -0
  327. package/templates/official-sample/files/README.md.vendored +92 -0
  328. package/templates/official-sample/files/esbuild.config.mjs.vendored +49 -0
  329. package/templates/official-sample/files/eslint.config.mts.vendored +32 -0
  330. package/templates/official-sample/files/manifest.json.vendored +11 -0
  331. package/templates/official-sample/files/package-lock.json.vendored +5053 -0
  332. package/templates/official-sample/files/package.json.vendored +27 -0
  333. package/templates/official-sample/files/src/main.ts.vendored +114 -0
  334. package/templates/official-sample/files/src/settings.ts.vendored +38 -0
  335. package/templates/official-sample/files/styles.css.vendored +8 -0
  336. package/templates/official-sample/files/tsconfig.json.vendored +19 -0
  337. package/templates/official-sample/files/version-bump.mjs.vendored +17 -0
  338. package/templates/official-sample/files/versions.json.vendored +3 -0
  339. package/upstreams.json +35 -0
  340. package/templates/default/dprint.json_dev-utils.ejs +0 -10
  341. package/templates/default/jest.config.ts@lint-root-dir_dev-utils.ejs +0 -1
  342. package/templates/default/scripts/build.ts@bundler_cli-bundler@lint-build-styles_dev-utils.ejs +0 -1
  343. package/templates/default/scripts/build.ts@bundler_esbuild@dev-utils-pre-build_tailwind.ejs +0 -2
  344. package/templates/default/scripts/build.ts@bundler_esbuild@lint-build-styles_dev-utils.ejs +0 -1
  345. package/templates/default/scripts/build.ts@bundler_esbuild@preset_dev-utils.ejs +0 -7
  346. package/templates/default/scripts/commit.ts_dev-utils.ejs +0 -3
  347. package/templates/default/scripts/dev.ts@bundler_esbuild@dev-utils-pre-build_tailwind.ejs +0 -2
  348. package/templates/default/scripts/dev.ts@bundler_esbuild@lint-build-styles_dev-utils.ejs +0 -1
  349. package/templates/default/scripts/dev.ts@bundler_esbuild@preset_dev-utils.ejs +0 -7
  350. package/templates/default/scripts/esbuild-plugins.ts.ejs +0 -20
  351. package/templates/default/scripts/esbuild-plugins.ts@dev-utils-import_vue.ejs +0 -2
  352. package/templates/default/scripts/esbuild-plugins.ts@dev-utils-plugin_vue.ejs +0 -1
  353. package/templates/default/scripts/esbuild-plugins.ts@dev-utils-plugin_wasm.ejs +0 -13
  354. package/templates/default/scripts/format-check.ts@tool_dprint@preset_dev-utils.ejs +0 -7
  355. package/templates/default/scripts/format.ts@tool_dprint@preset_dev-utils.ejs +0 -7
  356. package/templates/default/scripts/lint-fix.ts@tool_eslint@preset_dev-utils.ejs +0 -7
  357. package/templates/default/scripts/lint-md-fix.ts_dev-utils.ejs +0 -7
  358. package/templates/default/scripts/lint-md.ts_dev-utils.ejs +0 -7
  359. package/templates/default/scripts/lint.ts@tool_eslint@preset_dev-utils.ejs +0 -7
  360. package/templates/default/scripts/prepare.ts_dev-utils.ejs +0 -3
  361. package/templates/default/scripts/spellcheck.ts_dev-utils.ejs +0 -7
  362. package/templates/default/scripts/test-watch.ts_dev-utils@tool_jest.ejs +0 -13
  363. package/templates/default/scripts/test-watch.ts_dev-utils@tool_vitest.ejs +0 -8
  364. package/templates/default/scripts/test.ts_dev-utils@tool_jest.ejs +0 -13
  365. package/templates/default/scripts/test.ts_dev-utils@tool_vitest.ejs +0 -8
  366. package/templates/default/scripts/vite.config.ts@lint-empty-out-dir_dev-utils.ejs +0 -1
  367. package/templates/default/scripts/vite.config.ts@lint-out-dir_dev-utils.ejs +0 -1
  368. package/templates/default/scripts/webpack.config.ts@lint-webpack-default_dev-utils.ejs +0 -1
  369. package/templates/default/src/main.ts@import_css-modules.ejs +0 -1
  370. package/templates/default/src/views/sample-preact-view.tsx_dev-utils.ejs +0 -45
  371. package/templates/default/tsconfig.json_dev-utils@compiler-options_preact.ejs +0 -2
  372. package/templates/default/tsconfig.json_dev-utils@compiler-options_react.ejs +0 -1
  373. package/templates/default/tsconfig.json_dev-utils@compiler-options_solid.ejs +0 -2
  374. /package/templates/default/.github/workflows/{ci.yml@steps_biome-linter.ejs → ci.yml_standalone@steps_biome-linter.ejs} +0 -0
  375. /package/templates/default/.github/workflows/{ci.yml@steps_cspell.ejs → ci.yml_standalone@steps_cspell.ejs} +0 -0
  376. /package/templates/default/.github/workflows/{ci.yml@steps_dprint.ejs → ci.yml_standalone@steps_dprint.ejs} +0 -0
  377. /package/templates/default/.github/workflows/{ci.yml@steps_eslint.ejs → ci.yml_standalone@steps_eslint.ejs} +0 -0
  378. /package/templates/default/.github/workflows/{ci.yml@steps_jest.ejs → ci.yml_standalone@steps_jest.ejs} +0 -0
  379. /package/templates/default/.github/workflows/{ci.yml@steps_markdownlint.ejs → ci.yml_standalone@steps_markdownlint.ejs} +0 -0
  380. /package/templates/default/.github/workflows/{ci.yml@steps_prettier.ejs → ci.yml_standalone@steps_prettier.ejs} +0 -0
  381. /package/templates/default/.github/workflows/{ci.yml@steps_vitest.ejs → ci.yml_standalone@steps_vitest.ejs} +0 -0
  382. /package/templates/default/{.gitignore_tailwind.ejs → .gitignore_tailwind-cli.ejs} +0 -0
  383. /package/templates/default/{CONTRIBUTING.md@scripts_dev-utils.ejs → CONTRIBUTING.md@scripts_framework.ejs} +0 -0
  384. /package/templates/default/e2e/{sample.spec.ts_obsidian-test@lint-no-void-disable_dev-utils.ejs → sample.spec.ts_obsidian-test@lint-no-void-disable_framework.ejs} +0 -0
  385. /package/templates/default/e2e/{sample.spec.ts_obsidian-test@lint-no-void-enable_dev-utils.ejs → sample.spec.ts_obsidian-test@lint-no-void-enable_framework.ejs} +0 -0
  386. /package/templates/default/{eslint.config.mts_dev-utils.ejs → eslint.config.mts_framework.ejs} +0 -0
  387. /package/templates/default/{jest.config.ts@ts-jest-tsconfig_solid.ejs → jest.config.ts_standalone@ts-jest-tsconfig_solid.ejs} +0 -0
  388. /package/templates/default/{prettier.config.mjs.ejs → prettier.config.mjs_standalone.ejs} +0 -0
  389. /package/templates/default/scripts/{commitlint-config.ts.ejs → commitlint-config.ts_standalone.ejs} +0 -0
  390. /package/templates/default/scripts/{nano-staged-config.ts.ejs → nano-staged-config.ts_inline-nano-staged.ejs} +0 -0
  391. /package/templates/default/scripts/{rollup.config.ts@import_rollup-json.ejs → rollup.config.ts_framework@import_rollup-json.ejs} +0 -0
  392. /package/templates/default/scripts/{rollup.config.ts@import_scss.ejs → rollup.config.ts_framework@import_scss.ejs} +0 -0
  393. /package/templates/default/scripts/{rollup.config.ts@unwrap_rollup-json.ejs → rollup.config.ts_framework@unwrap_rollup-json.ejs} +0 -0
  394. /package/templates/default/scripts/{rollup.config.ts@unwrap_scss.ejs → rollup.config.ts_framework@unwrap_scss.ejs} +0 -0
  395. /package/templates/default/scripts/{rollup.config.ts@import_rollup-babel.ejs → rollup.config.ts_standalone@import_rollup-babel.ejs} +0 -0
  396. /package/templates/default/scripts/{rollup.config.ts@import_rollup-postcss.ejs → rollup.config.ts_standalone@import_rollup-postcss.ejs} +0 -0
  397. /package/templates/default/scripts/{rollup.config.ts@import_svelte.ejs → rollup.config.ts_standalone@import_svelte.ejs} +0 -0
  398. /package/templates/default/scripts/{rollup.config.ts@import_vue.ejs → rollup.config.ts_standalone@import_vue.ejs} +0 -0
  399. /package/templates/default/scripts/{rollup.config.ts@import_wasm.ejs → rollup.config.ts_standalone@import_wasm.ejs} +0 -0
  400. /package/templates/default/scripts/{rollup.config.ts@post-plugin_preact.ejs → rollup.config.ts_standalone@post-plugin_preact.ejs} +0 -0
  401. /package/templates/default/scripts/{rollup.config.ts@post-plugin_react.ejs → rollup.config.ts_standalone@post-plugin_react.ejs} +0 -0
  402. /package/templates/default/scripts/{rollup.config.ts@post-plugin_rollup-json.ejs → rollup.config.ts_standalone@post-plugin_rollup-json.ejs} +0 -0
  403. /package/templates/default/scripts/{rollup.config.ts@post-plugin_rollup-postcss.ejs → rollup.config.ts_standalone@post-plugin_rollup-postcss.ejs} +0 -0
  404. /package/templates/default/scripts/{rollup.config.ts@post-plugin_scss.ejs → rollup.config.ts_standalone@post-plugin_scss.ejs} +0 -0
  405. /package/templates/default/scripts/{rollup.config.ts@post-plugin_solid.ejs → rollup.config.ts_standalone@post-plugin_solid.ejs} +0 -0
  406. /package/templates/default/scripts/{rollup.config.ts@post-plugin_wasm.ejs → rollup.config.ts_standalone@post-plugin_wasm.ejs} +0 -0
  407. /package/templates/default/scripts/{rollup.config.ts@pre-plugin_svelte.ejs → rollup.config.ts_standalone@pre-plugin_svelte.ejs} +0 -0
  408. /package/templates/default/scripts/{rollup.config.ts@pre-plugin_vue.ejs → rollup.config.ts_standalone@pre-plugin_vue.ejs} +0 -0
  409. /package/templates/default/scripts/{rollup.config.ts@unwrap_rollup-babel.ejs → rollup.config.ts_standalone@unwrap_rollup-babel.ejs} +0 -0
  410. /package/templates/default/scripts/{rollup.config.ts@unwrap_rollup-postcss.ejs → rollup.config.ts_standalone@unwrap_rollup-postcss.ejs} +0 -0
  411. /package/templates/default/scripts/{rollup.config.ts@unwrap_svelte.ejs → rollup.config.ts_standalone@unwrap_svelte.ejs} +0 -0
  412. /package/templates/default/scripts/{rollup.config.ts@unwrap_vue.ejs → rollup.config.ts_standalone@unwrap_vue.ejs} +0 -0
  413. /package/templates/default/scripts/{rollup.config.ts@unwrap_wasm.ejs → rollup.config.ts_standalone@unwrap_wasm.ejs} +0 -0
  414. /package/templates/default/scripts/{test-watch.ts_dev-utils.ejs → test-watch.ts_framework.ejs} +0 -0
  415. /package/templates/default/scripts/{test.ts_dev-utils.ejs → test.ts_framework.ejs} +0 -0
  416. /package/templates/default/scripts/{vite.config.ts@import_preact.ejs → vite.config.ts_standalone@import_preact.ejs} +0 -0
  417. /package/templates/default/scripts/{vite.config.ts@import_react.ejs → vite.config.ts_standalone@import_react.ejs} +0 -0
  418. /package/templates/default/scripts/{vite.config.ts@import_solid.ejs → vite.config.ts_standalone@import_solid.ejs} +0 -0
  419. /package/templates/default/scripts/{vite.config.ts@import_svelte.ejs → vite.config.ts_standalone@import_svelte.ejs} +0 -0
  420. /package/templates/default/scripts/{vite.config.ts@import_vue.ejs → vite.config.ts_standalone@import_vue.ejs} +0 -0
  421. /package/templates/default/scripts/{vite.config.ts@plugin_preact.ejs → vite.config.ts_standalone@plugin_preact.ejs} +0 -0
  422. /package/templates/default/scripts/{vite.config.ts@plugin_react.ejs → vite.config.ts_standalone@plugin_react.ejs} +0 -0
  423. /package/templates/default/scripts/{vite.config.ts@plugin_solid.ejs → vite.config.ts_standalone@plugin_solid.ejs} +0 -0
  424. /package/templates/default/scripts/{vite.config.ts@plugin_svelte.ejs → vite.config.ts_standalone@plugin_svelte.ejs} +0 -0
  425. /package/templates/default/scripts/{vite.config.ts@plugin_vue.ejs → vite.config.ts_standalone@plugin_vue.ejs} +0 -0
  426. /package/templates/default/scripts/{webpack.config.ts@import_svelte.ejs → webpack.config.ts_standalone@import_svelte.ejs} +0 -0
  427. /package/templates/default/scripts/{webpack.config.ts@import_vue.ejs → webpack.config.ts_standalone@import_vue.ejs} +0 -0
  428. /package/templates/default/scripts/{webpack.config.ts@import_webpack-css-extract.ejs → webpack.config.ts_standalone@import_webpack-css-extract.ejs} +0 -0
  429. /package/templates/default/scripts/{webpack.config.ts@plugin_vue.ejs → webpack.config.ts_standalone@plugin_vue.ejs} +0 -0
  430. /package/templates/default/scripts/{webpack.config.ts@plugin_webpack-css-extract.ejs → webpack.config.ts_standalone@plugin_webpack-css-extract.ejs} +0 -0
  431. /package/templates/default/scripts/{webpack.config.ts@rule_css-modules.ejs → webpack.config.ts_standalone@rule_css-modules.ejs} +0 -0
  432. /package/templates/default/scripts/{webpack.config.ts@rule_css.ejs → webpack.config.ts_standalone@rule_css.ejs} +0 -0
  433. /package/templates/default/scripts/{webpack.config.ts@rule_postcss.ejs → webpack.config.ts_standalone@rule_postcss.ejs} +0 -0
  434. /package/templates/default/scripts/{webpack.config.ts@rule_scss.ejs → webpack.config.ts_standalone@rule_scss.ejs} +0 -0
  435. /package/templates/default/scripts/{webpack.config.ts@rule_solid.ejs → webpack.config.ts_standalone@rule_solid.ejs} +0 -0
  436. /package/templates/default/scripts/{webpack.config.ts@rule_svelte.ejs → webpack.config.ts_standalone@rule_svelte.ejs} +0 -0
  437. /package/templates/default/scripts/{webpack.config.ts@rule_tailwind.ejs → webpack.config.ts_standalone@rule_tailwind.ejs} +0 -0
  438. /package/templates/default/scripts/{webpack.config.ts@rule_vue.ejs → webpack.config.ts_standalone@rule_vue.ejs} +0 -0
  439. /package/templates/default/scripts/{webpack.config.ts@rule_wasm.ejs → webpack.config.ts_standalone@rule_wasm.ejs} +0 -0
  440. /package/templates/default/scripts/{webpack.config.ts@ts-loader-compiler-options_vue.ejs → webpack.config.ts_standalone@ts-loader-compiler-options_vue.ejs} +0 -0
  441. /package/templates/default/scripts/{webpack.config.ts@ts-loader-options_vue.ejs → webpack.config.ts_standalone@ts-loader-options_vue.ejs} +0 -0
  442. /package/templates/default/src/{plugin-settings-component.test.ts_enhanced@test-imports_vitest.ejs → plugin-settings-component.test.ts_all-in-one@test-imports_vitest.ejs} +0 -0
  443. /package/templates/default/src/{plugin-settings.ts_enhanced.ejs → plugin-settings.ts_all-in-one.ejs} +0 -0
  444. /package/templates/default/src/{plugin.ts_enhanced@import2_codemirror.ejs → plugin.ts_all-in-one@import2_codemirror.ejs} +0 -0
  445. /package/templates/default/src/{plugin.ts_enhanced@import2_i18next.ejs → plugin.ts_all-in-one@import2_i18next.ejs} +0 -0
  446. /package/templates/default/src/{plugin.ts_enhanced@import2_lit.ejs → plugin.ts_all-in-one@import2_lit.ejs} +0 -0
  447. /package/templates/default/src/{plugin.ts_enhanced@import2_preact.ejs → plugin.ts_all-in-one@import2_preact.ejs} +0 -0
  448. /package/templates/default/src/{plugin.ts_enhanced@import2_react.ejs → plugin.ts_all-in-one@import2_react.ejs} +0 -0
  449. /package/templates/default/src/{plugin.ts_enhanced@import2_solid.ejs → plugin.ts_all-in-one@import2_solid.ejs} +0 -0
  450. /package/templates/default/src/{plugin.ts_enhanced@import2_svelte.ejs → plugin.ts_all-in-one@import2_svelte.ejs} +0 -0
  451. /package/templates/default/src/{plugin.ts_enhanced@import2_typesafe-i18n.ejs → plugin.ts_all-in-one@import2_typesafe-i18n.ejs} +0 -0
  452. /package/templates/default/src/{plugin.ts_enhanced@import2_vue.ejs → plugin.ts_all-in-one@import2_vue.ejs} +0 -0
  453. /package/templates/default/src/{plugin.ts_enhanced@import2_wasm.ejs → plugin.ts_all-in-one@import2_wasm.ejs} +0 -0
  454. /package/templates/default/src/{plugin.ts_enhanced@method_ui-view.ejs → plugin.ts_all-in-one@method_ui-view.ejs} +0 -0
  455. /package/templates/default/src/{plugin.ts_enhanced@onload_codemirror.ejs → plugin.ts_all-in-one@onload_codemirror.ejs} +0 -0
  456. /package/templates/default/src/{plugin.ts_enhanced@onload_i18next.ejs → plugin.ts_all-in-one@onload_i18next.ejs} +0 -0
  457. /package/templates/default/src/{plugin.ts_enhanced@onload_lit.ejs → plugin.ts_all-in-one@onload_lit.ejs} +0 -0
  458. /package/templates/default/src/{plugin.ts_enhanced@onload_preact.ejs → plugin.ts_all-in-one@onload_preact.ejs} +0 -0
  459. /package/templates/default/src/{plugin.ts_enhanced@onload_react.ejs → plugin.ts_all-in-one@onload_react.ejs} +0 -0
  460. /package/templates/default/src/{plugin.ts_enhanced@onload_solid.ejs → plugin.ts_all-in-one@onload_solid.ejs} +0 -0
  461. /package/templates/default/src/{plugin.ts_enhanced@onload_svelte.ejs → plugin.ts_all-in-one@onload_svelte.ejs} +0 -0
  462. /package/templates/default/src/{plugin.ts_enhanced@onload_typesafe-i18n.ejs → plugin.ts_all-in-one@onload_typesafe-i18n.ejs} +0 -0
  463. /package/templates/default/src/{plugin.ts_enhanced@onload_vue.ejs → plugin.ts_all-in-one@onload_vue.ejs} +0 -0
  464. /package/templates/default/src/{plugin.ts_enhanced@onload_wasm.ejs → plugin.ts_all-in-one@onload_wasm.ejs} +0 -0
  465. /package/templates/default/src/preact-components/{sample-preact-component.tsx_dev-utils.ejs → sample-preact-component.tsx_framework.ejs} +0 -0
  466. /package/templates/default/src/solid-components/{sample-solid-component.tsx_dev-utils.ejs → sample-solid-component.tsx_framework.ejs} +0 -0
  467. /package/templates/default/src/styles/{main.css_dev-utils@content_tailwind.ejs → main.css_framework@content_tailwind.ejs} +0 -0
  468. /package/templates/default/src/views/{sample-lit-view.ts@lint-register-element_dev-utils.ejs → sample-lit-view.ts@lint-register-element_framework.ejs} +0 -0
  469. /package/templates/default/src/views/{sample-preact-view.tsx_standalone.ejs → sample-preact-view.tsx.ejs} +0 -0
  470. /package/templates/default/src/views/{sample-solid-view.tsx_dev-utils.ejs → sample-solid-view.tsx_framework.ejs} +0 -0
  471. /package/templates/default/src/wasm/{answer.ts_esbuild.ejs → answer.ts_wasm-esbuild.ejs} +0 -0
  472. /package/templates/default/src/wasm/{answer.ts_parcel.ejs → answer.ts_wasm-parcel.ejs} +0 -0
  473. /package/templates/default/src/wasm/{answer.ts_rollup.ejs → answer.ts_wasm-rollup.ejs} +0 -0
  474. /package/templates/default/src/wasm/{answer.ts_vite.ejs → answer.ts_wasm-vite.ejs} +0 -0
  475. /package/templates/default/src/wasm/{answer.ts_webpack.ejs → answer.ts_wasm-webpack.ejs} +0 -0
  476. /package/templates/default/src/{wasm.d.ts_esbuild.ejs → wasm.d.ts_wasm-esbuild.ejs} +0 -0
  477. /package/templates/default/src/{wasm.d.ts_parcel.ejs → wasm.d.ts_wasm-parcel.ejs} +0 -0
  478. /package/templates/default/src/{wasm.d.ts_rollup.ejs → wasm.d.ts_wasm-rollup.ejs} +0 -0
  479. /package/templates/default/src/{wasm.d.ts_vite.ejs → wasm.d.ts_wasm-vite.ejs} +0 -0
  480. /package/templates/default/src/{wasm.d.ts_webpack.ejs → wasm.d.ts_wasm-webpack.ejs} +0 -0
  481. /package/templates/default/{tsconfig.json_dev-utils@compiler-options_i18next.ejs → tsconfig.json_framework@compiler-options_i18next.ejs} +0 -0
  482. /package/templates/default/{tsconfig.json_dev-utils@compiler-options_lit.ejs → tsconfig.json_framework@compiler-options_lit.ejs} +0 -0
  483. /package/templates/default/{tsconfig.json_dev-utils@include_has-e2e.ejs → tsconfig.json_framework@include_has-e2e.ejs} +0 -0
  484. /package/templates/default/{tsconfig.json_dev-utils@include_svelte.ejs → tsconfig.json_framework@include_svelte.ejs} +0 -0
  485. /package/templates/default/{tsconfig.json_dev-utils@include_vue.ejs → tsconfig.json_framework@include_vue.ejs} +0 -0
  486. /package/templates/default/{tsconfig.json_dev-utils@types_jest.ejs → tsconfig.json_framework@types_jest.ejs} +0 -0
  487. /package/templates/default/{tsconfig.json_dev-utils@types_svelte.ejs → tsconfig.json_framework@types_svelte.ejs} +0 -0
  488. /package/templates/default/{tsconfig.json_dev-utils@types_wdio-obsidian.ejs → tsconfig.json_framework@types_wdio-obsidian.ejs} +0 -0
  489. /package/templates/default/{tsconfig.json_dev-utils@types_with-unofficial.ejs → tsconfig.json_framework@types_with-unofficial.ejs} +0 -0
  490. /package/templates/default/{vitest.config.ts_dev-utils.ejs → vitest.config.ts_framework.ejs} +0 -0
@@ -0,0 +1,9 @@
1
+ # Official sample plugin snapshot
2
+
3
+ `files/` is a snapshot of [obsidianmd/obsidian-sample-plugin](https://github.com/obsidianmd/obsidian-sample-plugin), copied by the `official-sample` preset. The commit it was taken at is pinned in the repository's `upstreams.json`.
4
+
5
+ Each file is upstream's committed bytes, stored under its upstream path with a `.vendored` suffix. The suffix keeps the snapshot from acting on this repository: git would read its `.gitignore`, npm never packs a `.gitignore` or an `.npmrc` under its own name, and coding agents would read its `AGENTS.md` as instructions.
6
+
7
+ Upstream is licensed under 0BSD, Copyright (C) 2020-2026 by Dynalist Inc. Its license text is `files/LICENSE.vendored`, and it is copied into every generated project unchanged.
8
+
9
+ Refresh it with `npm run sync:official-sample`. Do not edit these files by hand: `npm run sync:official-sample -- --check` fails when they differ from the pinned commit.
@@ -0,0 +1,11 @@
1
+ # top-most EditorConfig file
2
+ root = true
3
+
4
+ [*]
5
+ charset = utf-8
6
+ end_of_line = lf
7
+ insert_final_newline = true
8
+ indent_style = tab
9
+ indent_size = 4
10
+ quote_type = single
11
+ tab_width = 4
@@ -0,0 +1,27 @@
1
+ name: Node.js build
2
+
3
+ on:
4
+ push:
5
+ branches: ['**']
6
+ pull_request:
7
+ branches: ['**']
8
+
9
+ jobs:
10
+ build:
11
+ runs-on: ubuntu-latest
12
+
13
+ strategy:
14
+ matrix:
15
+ node-version: [20.x, 22.x, 24.x]
16
+ # See supported Node.js release schedule at https://nodejs.org/en/about/releases/
17
+
18
+ steps:
19
+ - uses: actions/checkout@v6
20
+ - name: Use Node.js ${{ matrix.node-version }}
21
+ uses: actions/setup-node@v6
22
+ with:
23
+ node-version: ${{ matrix.node-version }}
24
+ cache: 'npm'
25
+ - run: npm ci
26
+ - run: npm run build --if-present
27
+ - run: npm run lint
@@ -0,0 +1,50 @@
1
+ name: Release Obsidian plugin
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - '*'
7
+
8
+ jobs:
9
+ build:
10
+ runs-on: ubuntu-latest
11
+ permissions:
12
+ contents: write
13
+ id-token: write
14
+ attestations: write
15
+ steps:
16
+ - uses: actions/checkout@v6
17
+
18
+ - name: Use Node.js
19
+ uses: actions/setup-node@v6
20
+ with:
21
+ node-version: 24
22
+ cache: 'npm'
23
+
24
+ - name: Build plugin
25
+ run: |
26
+ npm ci
27
+ npm run build
28
+
29
+ - name: Check for optional styles
30
+ id: styles
31
+ run: |
32
+ [ -f styles.css ] && echo "exists=true" >> "$GITHUB_OUTPUT" || echo "exists=false" >> "$GITHUB_OUTPUT"
33
+
34
+ - name: Attest build provenance
35
+ uses: actions/attest@v4
36
+ with:
37
+ subject-path: |
38
+ main.js
39
+ ${{ steps.styles.outputs.exists == 'true' && 'styles.css' || '' }}
40
+
41
+ - name: Create release
42
+ env:
43
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44
+ run: |
45
+ tag="${GITHUB_REF#refs/tags/}"
46
+
47
+ gh release create "$tag" \
48
+ --title="$tag" \
49
+ --draft \
50
+ main.js manifest.json ${{ steps.styles.outputs.exists == 'true' && 'styles.css' || '' }}
@@ -0,0 +1,22 @@
1
+ # vscode
2
+ .vscode
3
+
4
+ # Intellij
5
+ *.iml
6
+ .idea
7
+
8
+ # npm
9
+ node_modules
10
+
11
+ # Don't include the compiled main.js file in the repo.
12
+ # They should be uploaded to GitHub releases instead.
13
+ main.js
14
+
15
+ # Exclude sourcemaps
16
+ *.map
17
+
18
+ # obsidian
19
+ data.json
20
+
21
+ # Exclude macOS Finder (System Explorer) View States
22
+ .DS_Store
@@ -0,0 +1 @@
1
+ tag-version-prefix=""
@@ -0,0 +1,269 @@
1
+ # Obsidian community plugin
2
+
3
+ ## Project overview
4
+
5
+ - Target: Obsidian Community Plugin (TypeScript → bundled JavaScript).
6
+ - Entry point: `src/main.ts` compiled to `main.js` and loaded by Obsidian.
7
+ - Required release artifacts: `main.js`, `manifest.json`, and optional `styles.css`.
8
+
9
+ ## Environment & tooling
10
+
11
+ - Node.js: use current LTS (Node 18+ recommended).
12
+ - **Package manager: npm** (required for this sample - `package.json` defines npm scripts and dependencies).
13
+ - **Bundler: esbuild** (required for this sample - `esbuild.config.mjs` and build scripts depend on it). Alternative bundlers like Rollup or webpack are acceptable for other projects if they bundle all external dependencies into `main.js`.
14
+ - Types: `obsidian` type definitions.
15
+
16
+ **Note**: This sample project has specific technical dependencies on npm and esbuild. If you're creating a plugin from scratch, you can choose different tools, but you'll need to replace the build configuration accordingly.
17
+
18
+ ### Install
19
+
20
+ ```bash
21
+ npm install
22
+ ```
23
+
24
+ ### Dev (watch)
25
+
26
+ ```bash
27
+ npm run dev
28
+ ```
29
+
30
+ ### Production build
31
+
32
+ ```bash
33
+ npm run build
34
+ ```
35
+
36
+ ## Linting
37
+
38
+ - ESLint is preconfigured with `eslint-plugin-obsidianmd` for Obsidian-specific rules.
39
+ - Run `npm run lint` to lint the project.
40
+ - A GitHub Action automatically lints every commit on all branches.
41
+
42
+ ## File & folder conventions
43
+
44
+ - **Organize code into multiple files**: Split functionality across separate modules rather than putting everything in `main.ts`.
45
+ - Source lives in `src/`. Keep `main.ts` small and focused on plugin lifecycle (loading, unloading, registering commands).
46
+ - **Example file structure**:
47
+ ```
48
+ src/
49
+ main.ts # Plugin entry point, lifecycle management
50
+ settings.ts # Settings interface and defaults
51
+ commands/ # Command implementations
52
+ command1.ts
53
+ command2.ts
54
+ ui/ # UI components, modals, views
55
+ modal.ts
56
+ view.ts
57
+ utils/ # Utility functions, helpers
58
+ helpers.ts
59
+ constants.ts
60
+ types.ts # TypeScript interfaces and types
61
+ ```
62
+ - **Do not commit build artifacts**: Never commit `node_modules/`, `main.js`, or other generated files to version control.
63
+ - Keep the plugin small. Avoid large dependencies. Prefer browser-compatible packages.
64
+ - Generated output should be placed at the plugin root or `dist/` depending on your build setup. Release artifacts must end up at the top level of the plugin folder in the vault (`main.js`, `manifest.json`, `styles.css`).
65
+
66
+ ## Manifest rules (`manifest.json`)
67
+
68
+ - Must include (non-exhaustive):
69
+ - `id` (plugin ID; for local dev it should match the folder name)
70
+ - `name`
71
+ - `version` (Semantic Versioning `x.y.z`)
72
+ - `minAppVersion`
73
+ - `description`
74
+ - `isDesktopOnly` (boolean)
75
+ - Optional: `author`, `authorUrl`, `fundingUrl` (string or map)
76
+ - Never change `id` after release. Treat it as stable API.
77
+ - Keep `minAppVersion` accurate when using newer APIs.
78
+ - Canonical requirements are coded here: https://github.com/obsidianmd/obsidian-releases/blob/master/.github/workflows/validate-plugin-entry.yml
79
+
80
+ ## Testing
81
+
82
+ - Manual install for testing: copy `main.js`, `manifest.json`, `styles.css` (if any) to:
83
+ ```
84
+ <Vault>/.obsidian/plugins/<plugin-id>/
85
+ ```
86
+ - Reload Obsidian and enable the plugin in **Settings → Community plugins**.
87
+
88
+ ## Commands & settings
89
+
90
+ - Any user-facing commands should be added via `this.addCommand(...)`.
91
+ - If the plugin has configuration, provide a settings tab and sensible defaults.
92
+ - Persist settings using `this.loadData()` / `this.saveData()`.
93
+ - Use stable command IDs; avoid renaming once released.
94
+
95
+ ## Versioning & releases
96
+
97
+ - Bump `version` in `manifest.json` (SemVer) and update `versions.json` to map plugin version → minimum app version.
98
+ - Create a GitHub release whose tag exactly matches `manifest.json`'s `version`. Do not use a leading `v`.
99
+ - Attach `manifest.json`, `main.js`, and `styles.css` (if present) to the release as individual assets.
100
+ - After the initial release, follow the process to add/update your plugin in the community catalog as required.
101
+
102
+ ## Security, privacy, and compliance
103
+
104
+ Follow Obsidian's **Developer Policies** and **Plugin Guidelines**. In particular:
105
+
106
+ - Default to local/offline operation. Only make network requests when essential to the feature.
107
+ - No hidden telemetry. If you collect optional analytics or call third-party services, require explicit opt-in and document clearly in `README.md` and in settings.
108
+ - Never execute remote code, fetch and eval scripts, or auto-update plugin code outside of normal releases.
109
+ - Minimize scope: read/write only what's necessary inside the vault. Do not access files outside the vault.
110
+ - Clearly disclose any external services used, data sent, and risks.
111
+ - Respect user privacy. Do not collect vault contents, filenames, or personal information unless absolutely necessary and explicitly consented.
112
+ - Avoid deceptive patterns, ads, or spammy notifications.
113
+ - Register and clean up all DOM, app, and interval listeners using the provided `register*` helpers so the plugin unloads safely.
114
+
115
+ ## UX & copy guidelines (for UI text, commands, settings)
116
+
117
+ - Prefer sentence case for headings, buttons, and titles.
118
+ - Use clear, action-oriented imperatives in step-by-step copy.
119
+ - Use **bold** to indicate literal UI labels. Prefer "select" for interactions.
120
+ - Use arrow notation for navigation: **Settings → Community plugins**.
121
+ - Keep in-app strings short, consistent, and free of jargon.
122
+
123
+ ## Performance
124
+
125
+ - Keep startup light. Defer heavy work until needed.
126
+ - Avoid long-running tasks during `onload`; use lazy initialization.
127
+ - Batch disk access and avoid excessive vault scans.
128
+ - Debounce/throttle expensive operations in response to file system events.
129
+
130
+ ## Coding conventions
131
+
132
+ - TypeScript with `"strict": true` preferred.
133
+ - **Keep `main.ts` minimal**: Focus only on plugin lifecycle (onload, onunload, addCommand calls). Delegate all feature logic to separate modules.
134
+ - **Split large files**: If any file exceeds ~200-300 lines, consider breaking it into smaller, focused modules.
135
+ - **Use clear module boundaries**: Each file should have a single, well-defined responsibility.
136
+ - Bundle everything into `main.js` (no unbundled runtime deps).
137
+ - Avoid Node/Electron APIs if you want mobile compatibility; set `isDesktopOnly` accordingly.
138
+ - Prefer `async/await` over promise chains; handle errors gracefully.
139
+
140
+ ## Mobile
141
+
142
+ - Where feasible, test on iOS and Android.
143
+ - Don't assume desktop-only behavior unless `isDesktopOnly` is `true`.
144
+ - Avoid large in-memory structures; be mindful of memory and storage constraints.
145
+
146
+ ## Agent do/don't
147
+
148
+ **Do**
149
+
150
+ - Add commands with stable IDs (don't rename once released).
151
+ - Provide defaults and validation in settings.
152
+ - Write idempotent code paths so reload/unload doesn't leak listeners or intervals.
153
+ - Use `this.register*` helpers for everything that needs cleanup.
154
+
155
+ **Don't**
156
+
157
+ - Introduce network calls without an obvious user-facing reason and documentation.
158
+ - Ship features that require cloud services without clear disclosure and explicit opt-in.
159
+ - Store or transmit vault contents unless essential and consented.
160
+
161
+ ## Common tasks
162
+
163
+ ### Organize code across multiple files
164
+
165
+ **main.ts** (minimal, lifecycle only):
166
+
167
+ ```ts
168
+ import { Plugin } from 'obsidian';
169
+ import { MySettings, DEFAULT_SETTINGS } from './settings';
170
+ import { registerCommands } from './commands';
171
+
172
+ export default class MyPlugin extends Plugin {
173
+ settings!: MySettings;
174
+
175
+ async onload() {
176
+ this.settings = Object.assign(
177
+ {},
178
+ DEFAULT_SETTINGS,
179
+ (await this.loadData()) as Partial<MySettings>,
180
+ );
181
+ registerCommands(this);
182
+ }
183
+ }
184
+ ```
185
+
186
+ **settings.ts**:
187
+
188
+ ```ts
189
+ export interface MySettings {
190
+ enabled: boolean;
191
+ apiKey: string;
192
+ }
193
+
194
+ export const DEFAULT_SETTINGS: MySettings = {
195
+ enabled: true,
196
+ apiKey: '',
197
+ };
198
+ ```
199
+
200
+ **commands/index.ts**:
201
+
202
+ ```ts
203
+ import { Plugin } from 'obsidian';
204
+ import { doSomething } from './my-command';
205
+
206
+ export function registerCommands(plugin: Plugin) {
207
+ plugin.addCommand({
208
+ id: 'do-something',
209
+ name: 'Do something',
210
+ callback: () => doSomething(plugin),
211
+ });
212
+ }
213
+ ```
214
+
215
+ ### Add a command
216
+
217
+ ```ts
218
+ this.addCommand({
219
+ id: 'your-command-id',
220
+ name: 'Do the thing',
221
+ callback: () => this.doTheThing(),
222
+ });
223
+ ```
224
+
225
+ ### Persist settings
226
+
227
+ ```ts
228
+ interface MySettings { enabled: boolean }
229
+ const DEFAULT_SETTINGS: MySettings = { enabled: true };
230
+
231
+ async onload() {
232
+ this.settings = Object.assign({}, DEFAULT_SETTINGS, await this.loadData() as Partial<MySettings>);
233
+ await this.saveData(this.settings);
234
+ }
235
+ ```
236
+
237
+ ### Register listeners safely
238
+
239
+ ```ts
240
+ this.registerEvent(
241
+ this.app.workspace.on('file-open', (f) => {
242
+ /* ... */
243
+ }),
244
+ );
245
+ this.registerDomEvent(activeWindow, 'resize', () => {
246
+ /* ... */
247
+ });
248
+ this.registerInterval(
249
+ window.setInterval(() => {
250
+ /* ... */
251
+ }, 1000),
252
+ );
253
+ ```
254
+
255
+ ## Troubleshooting
256
+
257
+ - Plugin doesn't load after build: ensure `main.js` and `manifest.json` are at the top level of the plugin folder under `<Vault>/.obsidian/plugins/<plugin-id>/`.
258
+ - Build issues: if `main.js` is missing, run `npm run build` or `npm run dev` to compile your TypeScript source code.
259
+ - Commands not appearing: verify `addCommand` runs after `onload` and IDs are unique.
260
+ - Settings not persisting: ensure `loadData`/`saveData` are awaited and you re-render the UI after changes.
261
+ - Mobile-only issues: confirm you're not using desktop-only APIs; check `isDesktopOnly` and adjust.
262
+
263
+ ## References
264
+
265
+ - Obsidian sample plugin: https://github.com/obsidianmd/obsidian-sample-plugin
266
+ - API documentation: https://docs.obsidian.md
267
+ - Developer policies: https://docs.obsidian.md/Developer+policies
268
+ - Plugin guidelines: https://docs.obsidian.md/Plugins/Releasing/Plugin+guidelines
269
+ - Style guide: https://help.obsidian.md/style-guide
@@ -0,0 +1,5 @@
1
+ Copyright (C) 2020-2026 by Dynalist Inc.
2
+
3
+ Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted.
4
+
5
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
@@ -0,0 +1,92 @@
1
+ # Obsidian Sample Plugin
2
+
3
+ This is a sample plugin for Obsidian (https://obsidian.md).
4
+
5
+ This project uses TypeScript to provide type checking and documentation.
6
+ The repo depends on the latest plugin API (obsidian.d.ts) in TypeScript Definition format, which contains TSDoc comments describing what it does.
7
+
8
+ This sample plugin demonstrates some of the basic functionality the plugin API can do.
9
+
10
+ - Adds a ribbon icon, which shows a Notice when clicked.
11
+ - Adds a command "Open modal (simple)" which opens a Modal.
12
+ - Adds a plugin setting tab to the settings page.
13
+ - Registers a global click event and outputs a Notice on click.
14
+ - Registers a global interval which logs 'setInterval' to the console.
15
+
16
+ ## First time developing plugins?
17
+
18
+ Quick starting guide for new plugin devs:
19
+
20
+ - Check if [someone already developed a plugin for what you want](https://obsidian.md/plugins)! There might be an existing plugin similar enough that you can partner up with.
21
+ - Make a copy of this repo as a template with the "Use this template" button (login to GitHub if you don't see it).
22
+ - Clone your repo to a local development folder. For convenience, you can place this folder in your `.obsidian/plugins/your-plugin-name` folder.
23
+ - Install NodeJS, then run `npm i` in the command line under your repo folder.
24
+ - Run `npm run dev` to compile your plugin from `src/main.ts` to `main.js`.
25
+ - Make changes to `src/main.ts` (or create new `.ts` files). Those changes should be automatically compiled into `main.js`.
26
+ - Reload Obsidian to load the new version of your plugin.
27
+ - Enable plugin in settings window.
28
+ - For updates to the Obsidian API run `npm update` in the command line under your repo folder.
29
+
30
+ ## Releasing new releases
31
+
32
+ - Update your `manifest.json` with your new version number, such as `1.0.1`, and the minimum Obsidian version required for your latest release.
33
+ - Update your `versions.json` file with `"new-plugin-version": "minimum-obsidian-version"` so older versions of Obsidian can download an older version of your plugin that's compatible.
34
+ - Create new GitHub release using your new version number as the "Tag version". Use the exact version number, don't include a prefix `v`. See here for an example: https://github.com/obsidianmd/obsidian-sample-plugin/releases
35
+ - Upload the files `manifest.json`, `main.js`, `styles.css` as binary attachments. Note: The manifest.json file must be in two places, first the root path of your repository and also in the release.
36
+ - Publish the release.
37
+
38
+ > You can simplify the version bump process by running `npm version patch`, `npm version minor` or `npm version major` after updating `minAppVersion` manually in `manifest.json`.
39
+ > The command will bump version in `manifest.json` and `package.json`, and add the entry for the new version to `versions.json`
40
+
41
+ ## Adding your plugin to the community plugin list
42
+
43
+ - Check the [plugin guidelines](https://docs.obsidian.md/Plugins/Releasing/Plugin+guidelines).
44
+ - Publish an initial version.
45
+ - Make sure you have a `README.md` file in the root of your repo.
46
+ - Make a pull request at https://github.com/obsidianmd/obsidian-releases to add your plugin.
47
+
48
+ ## How to use
49
+
50
+ - Clone this repo.
51
+ - Make sure your NodeJS is at least v18 (`node --version`).
52
+ - `npm i` to install dependencies.
53
+ - `npm run dev` to start compilation in watch mode.
54
+
55
+ ## Manually installing the plugin
56
+
57
+ - Copy over `main.js`, `styles.css`, `manifest.json` to your vault `VaultFolder/.obsidian/plugins/your-plugin-id/`.
58
+
59
+ ## Improve code quality with eslint
60
+
61
+ - [ESLint](https://eslint.org/) is a tool that analyzes your code to quickly find problems. You can run ESLint against your plugin to find common bugs and ways to improve your code.
62
+ - This project already has eslint preconfigured, you can invoke a check by running`npm run lint`
63
+ - Together with a custom eslint [plugin](https://github.com/obsidianmd/eslint-plugin) for Obsidan specific code guidelines.
64
+ - A GitHub action is preconfigured to automatically lint every commit on all branches.
65
+
66
+ ## Funding URL
67
+
68
+ You can include funding URLs where people who use your plugin can financially support it.
69
+
70
+ The simple way is to set the `fundingUrl` field to your link in your `manifest.json` file:
71
+
72
+ ```json
73
+ {
74
+ "fundingUrl": "https://buymeacoffee.com"
75
+ }
76
+ ```
77
+
78
+ If you have multiple URLs, you can also do:
79
+
80
+ ```json
81
+ {
82
+ "fundingUrl": {
83
+ "Buy Me a Coffee": "https://buymeacoffee.com",
84
+ "GitHub Sponsor": "https://github.com/sponsors",
85
+ "Patreon": "https://www.patreon.com/"
86
+ }
87
+ }
88
+ ```
89
+
90
+ ## API Documentation
91
+
92
+ See https://docs.obsidian.md
@@ -0,0 +1,49 @@
1
+ import esbuild from 'esbuild';
2
+ import process from 'process';
3
+ import { builtinModules } from 'node:module';
4
+
5
+ const banner = `/*
6
+ THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
7
+ if you want to view the source, please visit the github repository of this plugin
8
+ */
9
+ `;
10
+
11
+ const prod = process.argv[2] === 'production';
12
+
13
+ const context = await esbuild.context({
14
+ banner: {
15
+ js: banner,
16
+ },
17
+ entryPoints: ['src/main.ts'],
18
+ bundle: true,
19
+ external: [
20
+ 'obsidian',
21
+ 'electron',
22
+ '@codemirror/autocomplete',
23
+ '@codemirror/collab',
24
+ '@codemirror/commands',
25
+ '@codemirror/language',
26
+ '@codemirror/lint',
27
+ '@codemirror/search',
28
+ '@codemirror/state',
29
+ '@codemirror/view',
30
+ '@lezer/common',
31
+ '@lezer/highlight',
32
+ '@lezer/lr',
33
+ ...builtinModules,
34
+ ],
35
+ format: 'cjs',
36
+ target: 'es2021',
37
+ logLevel: 'info',
38
+ sourcemap: prod ? false : 'inline',
39
+ treeShaking: true,
40
+ outfile: 'main.js',
41
+ minify: prod,
42
+ });
43
+
44
+ if (prod) {
45
+ await context.rebuild();
46
+ process.exit(0);
47
+ } else {
48
+ await context.watch();
49
+ }
@@ -0,0 +1,32 @@
1
+ import obsidianmd from 'eslint-plugin-obsidianmd';
2
+ import globals from 'globals';
3
+ import { globalIgnores, defineConfig } from 'eslint/config';
4
+
5
+ export default defineConfig(
6
+ globalIgnores([
7
+ 'node_modules',
8
+ 'dist',
9
+ 'esbuild.config.mjs',
10
+ 'version-bump.mjs',
11
+ 'versions.json',
12
+ 'main.js',
13
+ 'package.json',
14
+ 'package-lock.json',
15
+ 'tsconfig.json',
16
+ ]),
17
+ {
18
+ languageOptions: {
19
+ globals: {
20
+ ...globals.browser,
21
+ },
22
+ parserOptions: {
23
+ projectService: {
24
+ allowDefaultProject: ['eslint.config.mts', 'manifest.json'],
25
+ },
26
+ tsconfigRootDir: import.meta.dirname,
27
+ extraFileExtensions: ['.json'],
28
+ },
29
+ },
30
+ },
31
+ ...obsidianmd.configs.recommended,
32
+ );
@@ -0,0 +1,11 @@
1
+ {
2
+ "id": "sample-plugin",
3
+ "name": "Sample Plugin",
4
+ "version": "1.0.0",
5
+ "minAppVersion": "1.0.0",
6
+ "description": "Demonstrates some of the capabilities of the Obsidian API.",
7
+ "author": "Obsidian",
8
+ "authorUrl": "https://obsidian.md",
9
+ "fundingUrl": "https://obsidian.md/pricing",
10
+ "isDesktopOnly": false
11
+ }