@mnaoumov/create-obsidian-plugin 0.0.0-stage → 1.0.1
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/LICENSE +19 -0
- package/README.md +341 -2
- package/dist/main.js +4184 -0
- package/package.json +83 -4
- package/src/main.ts +650 -0
- package/templates/default/.depcheckrc.json.ejs +19 -0
- package/templates/default/.editorconfig.ejs +11 -0
- package/templates/default/.env.ejs +1 -0
- package/templates/default/.env@vault_has-vault-false.ejs +2 -0
- package/templates/default/.env@vault_has-vault-true.ejs +1 -0
- package/templates/default/.gitattributes.ejs +7 -0
- package/templates/default/.github/FUNDING.yml.ejs +3 -0
- package/templates/default/.github/ISSUE_TEMPLATE/bug_report.yml.ejs +71 -0
- package/templates/default/.github/ISSUE_TEMPLATE/config.yml.ejs +1 -0
- package/templates/default/.github/ISSUE_TEMPLATE/feature_request.yml.ejs +61 -0
- package/templates/default/.github/workflows/attest-release-assets.yml.ejs +24 -0
- package/templates/default/.github/workflows/ci.yml.ejs +20 -0
- package/templates/default/.github/workflows/ci.yml@steps_biome-linter.ejs +1 -0
- package/templates/default/.github/workflows/ci.yml@steps_cspell.ejs +1 -0
- package/templates/default/.github/workflows/ci.yml@steps_dprint.ejs +1 -0
- package/templates/default/.github/workflows/ci.yml@steps_eslint.ejs +1 -0
- package/templates/default/.github/workflows/ci.yml@steps_jest.ejs +1 -0
- package/templates/default/.github/workflows/ci.yml@steps_markdownlint.ejs +1 -0
- package/templates/default/.github/workflows/ci.yml@steps_prettier.ejs +1 -0
- package/templates/default/.github/workflows/ci.yml@steps_vitest.ejs +1 -0
- package/templates/default/.github/workflows/release.yml.ejs +27 -0
- package/templates/default/.github/workflows/update-license-year.yml.ejs +38 -0
- package/templates/default/.gitignore_common.ejs +27 -0
- package/templates/default/.gitignore_scss.ejs +1 -0
- package/templates/default/.gitignore_tailwind.ejs +3 -0
- package/templates/default/.husky/commit-msg.ejs +1 -0
- package/templates/default/.husky/pre-commit.ejs +1 -0
- package/templates/default/.markdownlint-cli2.mjs.ejs +4 -0
- package/templates/default/.nano-staged.mjs.ejs +5 -0
- package/templates/default/.npmrc.ejs +1 -0
- package/templates/default/.parcelrc.ejs +9 -0
- package/templates/default/.parcelrc@transformers_svelte.ejs +1 -0
- package/templates/default/.prettierignore.ejs +10 -0
- package/templates/default/.typesafe-i18n.json.ejs +5 -0
- package/templates/default/CONTRIBUTING.md.ejs +49 -0
- package/templates/default/CONTRIBUTING.md@demo-vault_dev-utils.ejs +15 -0
- package/templates/default/CONTRIBUTING.md@scripts_biome-formatter.ejs +1 -0
- package/templates/default/CONTRIBUTING.md@scripts_biome-linter.ejs +1 -0
- package/templates/default/CONTRIBUTING.md@scripts_conventional-commits.ejs +1 -0
- package/templates/default/CONTRIBUTING.md@scripts_cspell.ejs +1 -0
- package/templates/default/CONTRIBUTING.md@scripts_dev-utils.ejs +1 -0
- package/templates/default/CONTRIBUTING.md@scripts_dprint.ejs +1 -0
- package/templates/default/CONTRIBUTING.md@scripts_eslint.ejs +1 -0
- package/templates/default/CONTRIBUTING.md@scripts_jest.ejs +1 -0
- package/templates/default/CONTRIBUTING.md@scripts_markdownlint.ejs +1 -0
- package/templates/default/CONTRIBUTING.md@scripts_prettier.ejs +1 -0
- package/templates/default/CONTRIBUTING.md@scripts_vitest.ejs +1 -0
- package/templates/default/LICENSE.ejs +21 -0
- package/templates/default/README.md.ejs +28 -0
- package/templates/default/README.md@demo-vault_dev-utils.ejs +12 -0
- package/templates/default/README.md@preset_dev-utils.ejs +12 -0
- package/templates/default/README.md@support_has-funding.ejs +8 -0
- package/templates/default/babel.config.json.ejs +8 -0
- package/templates/default/babel.config.mjs.ejs +5 -0
- package/templates/default/biome.jsonc.ejs +47 -0
- package/templates/default/commitlint.config.ts.ejs +1 -0
- package/templates/default/cspell.json.ejs +67 -0
- package/templates/default/demo-vault/.gitignore.ejs +15 -0
- package/templates/default/demo-vault/.obsidian/app.json.ejs +4 -0
- package/templates/default/demo-vault/.obsidian/community-plugins.json.ejs +4 -0
- package/templates/default/demo-vault/00 Start.md.ejs +32 -0
- package/templates/default/demo-vault/00 Start.md@features_wasm.ejs +1 -0
- package/templates/default/demo-vault/01 Sample commands.md.ejs +38 -0
- package/templates/default/demo-vault/01 Sample commands.md@commands_wasm.ejs +4 -0
- package/templates/default/demo-vault/02 Settings.md.ejs +40 -0
- package/templates/default/demo-vault/03 WebAssembly.md.ejs +34 -0
- package/templates/default/demo-vault/Materials/01 Sample commands/Scratch note.md.ejs +5 -0
- package/templates/default/demo-vault/README.md.ejs +10 -0
- package/templates/default/demo-vault/_assets/CodeScriptToolkit/demoSetup.ts.ejs +88 -0
- package/templates/default/demo-vault/_assets/CodeScriptToolkit/demoSetup.ts@commands_wasm.ejs +10 -0
- package/templates/default/demo-vault/_assets/CodeScriptToolkit/startup.ts.ejs +17 -0
- package/templates/default/dprint.json_dev-utils.ejs +10 -0
- package/templates/default/dprint.json_standalone.ejs +26 -0
- package/templates/default/e2e/sample.spec.ts_obsidian-test.ejs +16 -0
- package/templates/default/e2e/sample.spec.ts_obsidian-test@lint-no-void-disable_dev-utils.ejs +3 -0
- package/templates/default/e2e/sample.spec.ts_obsidian-test@lint-no-void-enable_dev-utils.ejs +1 -0
- package/templates/default/e2e/sample.spec.ts_obsidian-test@unofficial_with-unofficial.ejs +13 -0
- package/templates/default/e2e/sample.spec.ts_wdio-obsidian.ejs +7 -0
- package/templates/default/e2e/sample.spec.ts_wdio-obsidian@unofficial_with-unofficial.ejs +15 -0
- package/templates/default/eslint.config.mts_dev-utils.ejs +1 -0
- package/templates/default/eslint.config.mts_standalone.ejs +119 -0
- package/templates/default/eslint.config.mts_standalone@extra-files_has-e2e.ejs +2 -0
- package/templates/default/jest.config.ts.ejs +57 -0
- package/templates/default/jest.config.ts@lint-root-dir_dev-utils.ejs +1 -0
- package/templates/default/jest.config.ts@ts-jest-tsconfig_solid.ejs +8 -0
- package/templates/default/linkinator.config.json.ejs +11 -0
- package/templates/default/manifest.json.ejs +11 -0
- package/templates/default/manifest.json@funding_has-funding.ejs +1 -0
- package/templates/default/manifest.json@platform_desktop-and-mobile.ejs +1 -0
- package/templates/default/manifest.json@platform_desktop-only.ejs +1 -0
- package/templates/default/package.json.ejs +32 -0
- package/templates/default/package.json@targets_parcel.ejs +36 -0
- package/templates/default/parcel-namer-obsidian.cjs.ejs +26 -0
- package/templates/default/parcel-resolver-obsidian.cjs.ejs +37 -0
- package/templates/default/parcel-transformer-inline-imports.cjs.ejs +39 -0
- package/templates/default/parcel-transformer-svelte.cjs.ejs +67 -0
- package/templates/default/pinned-versions.json.ejs +1 -0
- package/templates/default/pnpm-workspace.yaml.ejs +19 -0
- package/templates/default/postcss.config.cjs.ejs +12 -0
- package/templates/default/prettier.config.mjs.ejs +5 -0
- package/templates/default/rollup.config.mjs.ejs +7 -0
- package/templates/default/scripts/babel.config.ts_rollup.ejs +16 -0
- package/templates/default/scripts/babel.config.ts_rollup@babel-plugin_preact.ejs +1 -0
- package/templates/default/scripts/babel.config.ts_rollup@babel-preset_react.ejs +1 -0
- package/templates/default/scripts/babel.config.ts_rollup@babel-preset_solid.ejs +1 -0
- package/templates/default/scripts/build-clean.ts.ejs +4 -0
- package/templates/default/scripts/build-compile.ts.ejs +4 -0
- package/templates/default/scripts/build-styles.ts.ejs +12 -0
- package/templates/default/scripts/build.ts.ejs +6 -0
- package/templates/default/scripts/build.ts@bundler_cli-bundler.ejs +63 -0
- package/templates/default/scripts/build.ts@bundler_cli-bundler@compile_svelte.ejs +4 -0
- package/templates/default/scripts/build.ts@bundler_cli-bundler@fs-import_hot-reload-plugin.ejs +2 -0
- package/templates/default/scripts/build.ts@bundler_cli-bundler@hot-reload_hot-reload-plugin.ejs +3 -0
- package/templates/default/scripts/build.ts@bundler_cli-bundler@import_tailwind.ejs +2 -0
- package/templates/default/scripts/build.ts@bundler_cli-bundler@lint-build-styles_dev-utils.ejs +1 -0
- package/templates/default/scripts/build.ts@bundler_cli-bundler@reload_obsidian-cli.ejs +5 -0
- package/templates/default/scripts/build.ts@bundler_cli-bundler@run_parcel.ejs +1 -0
- package/templates/default/scripts/build.ts@bundler_cli-bundler@run_rollup.ejs +1 -0
- package/templates/default/scripts/build.ts@bundler_cli-bundler@run_vite.ejs +1 -0
- package/templates/default/scripts/build.ts@bundler_cli-bundler@run_webpack.ejs +1 -0
- package/templates/default/scripts/build.ts@bundler_esbuild.ejs +3 -0
- package/templates/default/scripts/build.ts@bundler_esbuild@compile_svelte.ejs +4 -0
- package/templates/default/scripts/build.ts@bundler_esbuild@dev-utils-pre-build_tailwind.ejs +2 -0
- package/templates/default/scripts/build.ts@bundler_esbuild@fs-import_hot-reload-plugin.ejs +2 -0
- package/templates/default/scripts/build.ts@bundler_esbuild@hot-reload_hot-reload-plugin.ejs +4 -0
- package/templates/default/scripts/build.ts@bundler_esbuild@import_postcss.ejs +1 -0
- package/templates/default/scripts/build.ts@bundler_esbuild@import_scss.ejs +1 -0
- package/templates/default/scripts/build.ts@bundler_esbuild@import_solid.ejs +1 -0
- package/templates/default/scripts/build.ts@bundler_esbuild@import_svelte.ejs +10 -0
- package/templates/default/scripts/build.ts@bundler_esbuild@import_tailwind.ejs +1 -0
- package/templates/default/scripts/build.ts@bundler_esbuild@import_vue.ejs +1 -0
- package/templates/default/scripts/build.ts@bundler_esbuild@lint-build-styles_dev-utils.ejs +1 -0
- package/templates/default/scripts/build.ts@bundler_esbuild@options_preact.ejs +2 -0
- package/templates/default/scripts/build.ts@bundler_esbuild@options_react.ejs +1 -0
- package/templates/default/scripts/build.ts@bundler_esbuild@options_wasm.ejs +5 -0
- package/templates/default/scripts/build.ts@bundler_esbuild@plugin_postcss.ejs +1 -0
- package/templates/default/scripts/build.ts@bundler_esbuild@plugin_scss.ejs +1 -0
- package/templates/default/scripts/build.ts@bundler_esbuild@plugin_solid.ejs +1 -0
- package/templates/default/scripts/build.ts@bundler_esbuild@plugin_svelte.ejs +5 -0
- package/templates/default/scripts/build.ts@bundler_esbuild@plugin_vue.ejs +1 -0
- package/templates/default/scripts/build.ts@bundler_esbuild@preset_dev-utils.ejs +7 -0
- package/templates/default/scripts/build.ts@bundler_esbuild@preset_standalone.ejs +138 -0
- package/templates/default/scripts/build.ts@bundler_esbuild@reload_obsidian-cli.ejs +6 -0
- package/templates/default/scripts/commit.ts_dev-utils.ejs +3 -0
- package/templates/default/scripts/commit.ts_standalone.ejs +3 -0
- package/templates/default/scripts/commitlint-config.ts.ejs +5 -0
- package/templates/default/scripts/demo-vault-global-setup.ts.ejs +43 -0
- package/templates/default/scripts/dev.ts.ejs +6 -0
- package/templates/default/scripts/dev.ts@bundler_cli-bundler.ejs +8 -0
- package/templates/default/scripts/dev.ts@bundler_esbuild.ejs +3 -0
- package/templates/default/scripts/dev.ts@bundler_esbuild@dev-utils-pre-build_tailwind.ejs +2 -0
- package/templates/default/scripts/dev.ts@bundler_esbuild@lint-build-styles_dev-utils.ejs +1 -0
- package/templates/default/scripts/dev.ts@bundler_esbuild@preset_dev-utils.ejs +7 -0
- package/templates/default/scripts/dev.ts@bundler_esbuild@preset_standalone.ejs +3 -0
- package/templates/default/scripts/esbuild-plugins.ts.ejs +20 -0
- package/templates/default/scripts/esbuild-plugins.ts@dev-utils-import_vue.ejs +2 -0
- package/templates/default/scripts/esbuild-plugins.ts@dev-utils-plugin_vue.ejs +1 -0
- package/templates/default/scripts/esbuild-plugins.ts@dev-utils-plugin_wasm.ejs +13 -0
- package/templates/default/scripts/eslint-config.ts.ejs +113 -0
- package/templates/default/scripts/eslint-config.ts@extra-files_has-e2e.ejs +7 -0
- package/templates/default/scripts/find-overexposed-fix.ts.ejs +26 -0
- package/templates/default/scripts/find-overexposed.ts.ejs +15 -0
- package/templates/default/scripts/format-check.ts.ejs +4 -0
- package/templates/default/scripts/format-check.ts@tool_biome-formatter.ejs +8 -0
- package/templates/default/scripts/format-check.ts@tool_dprint.ejs +3 -0
- package/templates/default/scripts/format-check.ts@tool_dprint@preset_dev-utils.ejs +7 -0
- package/templates/default/scripts/format-check.ts@tool_dprint@preset_standalone.ejs +8 -0
- package/templates/default/scripts/format-check.ts@tool_prettier.ejs +8 -0
- package/templates/default/scripts/format.ts.ejs +4 -0
- package/templates/default/scripts/format.ts@tool_biome-formatter.ejs +8 -0
- package/templates/default/scripts/format.ts@tool_dprint.ejs +3 -0
- package/templates/default/scripts/format.ts@tool_dprint@preset_dev-utils.ejs +7 -0
- package/templates/default/scripts/format.ts@tool_dprint@preset_standalone.ejs +8 -0
- package/templates/default/scripts/format.ts@tool_prettier.ejs +8 -0
- package/templates/default/scripts/framework-component-stub.ts.ejs +46 -0
- package/templates/default/scripts/gate.ts.ejs +10 -0
- package/templates/default/scripts/lint-fix.ts.ejs +6 -0
- package/templates/default/scripts/lint-fix.ts@tool_biome-linter.ejs +8 -0
- package/templates/default/scripts/lint-fix.ts@tool_eslint.ejs +3 -0
- package/templates/default/scripts/lint-fix.ts@tool_eslint@preset_dev-utils.ejs +7 -0
- package/templates/default/scripts/lint-fix.ts@tool_eslint@preset_standalone.ejs +8 -0
- package/templates/default/scripts/lint-md-fix.ts_dev-utils.ejs +7 -0
- package/templates/default/scripts/lint-md-fix.ts_standalone.ejs +37 -0
- package/templates/default/scripts/lint-md.ts_dev-utils.ejs +7 -0
- package/templates/default/scripts/lint-md.ts_standalone.ejs +37 -0
- package/templates/default/scripts/lint.ts.ejs +6 -0
- package/templates/default/scripts/lint.ts@tool_biome-linter.ejs +8 -0
- package/templates/default/scripts/lint.ts@tool_eslint.ejs +3 -0
- package/templates/default/scripts/lint.ts@tool_eslint@preset_dev-utils.ejs +7 -0
- package/templates/default/scripts/lint.ts@tool_eslint@preset_standalone.ejs +8 -0
- package/templates/default/scripts/markdownlint-cli2-config.ts_dev-utils.ejs +14 -0
- package/templates/default/scripts/markdownlint-cli2-config.ts_standalone.ejs +36 -0
- package/templates/default/scripts/nano-staged-config.ts.ejs +9 -0
- package/templates/default/scripts/postcss.config.ts.ejs +1 -0
- package/templates/default/scripts/postcss.config.ts@plugins_postcss.ejs +7 -0
- package/templates/default/scripts/prepare.ts_dev-utils.ejs +3 -0
- package/templates/default/scripts/prepare.ts_standalone.ejs +3 -0
- package/templates/default/scripts/prettier.config.ts.ejs +12 -0
- package/templates/default/scripts/rollup.config.ts.ejs +129 -0
- package/templates/default/scripts/rollup.config.ts@import_rollup-babel.ejs +5 -0
- package/templates/default/scripts/rollup.config.ts@import_rollup-json.ejs +1 -0
- package/templates/default/scripts/rollup.config.ts@import_rollup-postcss.ejs +4 -0
- package/templates/default/scripts/rollup.config.ts@import_scss.ejs +1 -0
- package/templates/default/scripts/rollup.config.ts@import_svelte.ejs +2 -0
- package/templates/default/scripts/rollup.config.ts@import_vue.ejs +1 -0
- package/templates/default/scripts/rollup.config.ts@import_wasm.ejs +1 -0
- package/templates/default/scripts/rollup.config.ts@lint-out-dir_dev-utils.ejs +1 -0
- package/templates/default/scripts/rollup.config.ts@post-plugin_preact.ejs +4 -0
- package/templates/default/scripts/rollup.config.ts@post-plugin_react.ejs +5 -0
- package/templates/default/scripts/rollup.config.ts@post-plugin_rollup-json.ejs +1 -0
- package/templates/default/scripts/rollup.config.ts@post-plugin_rollup-postcss.ejs +4 -0
- package/templates/default/scripts/rollup.config.ts@post-plugin_scss.ejs +4 -0
- package/templates/default/scripts/rollup.config.ts@post-plugin_solid.ejs +4 -0
- package/templates/default/scripts/rollup.config.ts@post-plugin_wasm.ejs +4 -0
- package/templates/default/scripts/rollup.config.ts@pre-plugin_svelte.ejs +4 -0
- package/templates/default/scripts/rollup.config.ts@pre-plugin_vue.ejs +13 -0
- package/templates/default/scripts/rollup.config.ts@unwrap_rollup-babel.ejs +1 -0
- package/templates/default/scripts/rollup.config.ts@unwrap_rollup-json.ejs +1 -0
- package/templates/default/scripts/rollup.config.ts@unwrap_rollup-postcss.ejs +1 -0
- package/templates/default/scripts/rollup.config.ts@unwrap_scss.ejs +1 -0
- package/templates/default/scripts/rollup.config.ts@unwrap_svelte.ejs +1 -0
- package/templates/default/scripts/rollup.config.ts@unwrap_vue.ejs +1 -0
- package/templates/default/scripts/rollup.config.ts@unwrap_wasm.ejs +1 -0
- package/templates/default/scripts/spellcheck.ts_dev-utils.ejs +7 -0
- package/templates/default/scripts/spellcheck.ts_standalone.ejs +8 -0
- package/templates/default/scripts/stylesheet-stub.ts.ejs +17 -0
- package/templates/default/scripts/test-coverage.ts.ejs +8 -0
- package/templates/default/scripts/test-e2e.ts.ejs +1 -0
- package/templates/default/scripts/test-e2e.ts@tool_obsidian-test.ejs +8 -0
- package/templates/default/scripts/test-e2e.ts@tool_wdio-obsidian.ejs +8 -0
- package/templates/default/scripts/test-integration-android.ts.ejs +8 -0
- package/templates/default/scripts/test-integration-demo-vault.ts.ejs +8 -0
- package/templates/default/scripts/test-integration-desktop-performance.ts.ejs +8 -0
- package/templates/default/scripts/test-integration-desktop.ts.ejs +8 -0
- package/templates/default/scripts/test-integration-no-app.ts.ejs +8 -0
- package/templates/default/scripts/test-integration.ts.ejs +22 -0
- package/templates/default/scripts/test-watch.ts_dev-utils.ejs +1 -0
- package/templates/default/scripts/test-watch.ts_dev-utils@tool_jest.ejs +13 -0
- package/templates/default/scripts/test-watch.ts_dev-utils@tool_vitest.ejs +8 -0
- package/templates/default/scripts/test-watch.ts_standalone.ejs +1 -0
- package/templates/default/scripts/test-watch.ts_standalone@tool_jest.ejs +13 -0
- package/templates/default/scripts/test-watch.ts_standalone@tool_vitest.ejs +8 -0
- package/templates/default/scripts/test.ts_dev-utils.ejs +1 -0
- package/templates/default/scripts/test.ts_dev-utils@tool_jest.ejs +13 -0
- package/templates/default/scripts/test.ts_dev-utils@tool_vitest.ejs +8 -0
- package/templates/default/scripts/test.ts_standalone.ejs +1 -0
- package/templates/default/scripts/test.ts_standalone@tool_jest.ejs +13 -0
- package/templates/default/scripts/test.ts_standalone@tool_vitest.ejs +8 -0
- package/templates/default/scripts/version.ts_dev-utils.ejs +10 -0
- package/templates/default/scripts/version.ts_standalone.ejs +317 -0
- package/templates/default/scripts/vite.config.ts.ejs +76 -0
- package/templates/default/scripts/vite.config.ts@import_preact.ejs +1 -0
- package/templates/default/scripts/vite.config.ts@import_react.ejs +1 -0
- package/templates/default/scripts/vite.config.ts@import_solid.ejs +1 -0
- package/templates/default/scripts/vite.config.ts@import_svelte.ejs +1 -0
- package/templates/default/scripts/vite.config.ts@import_vue.ejs +1 -0
- package/templates/default/scripts/vite.config.ts@lint-empty-out-dir_dev-utils.ejs +1 -0
- package/templates/default/scripts/vite.config.ts@lint-out-dir_dev-utils.ejs +1 -0
- package/templates/default/scripts/vite.config.ts@plugin_preact.ejs +1 -0
- package/templates/default/scripts/vite.config.ts@plugin_react.ejs +1 -0
- package/templates/default/scripts/vite.config.ts@plugin_solid.ejs +1 -0
- package/templates/default/scripts/vite.config.ts@plugin_svelte.ejs +1 -0
- package/templates/default/scripts/vite.config.ts@plugin_vue.ejs +1 -0
- package/templates/default/scripts/vitest-config.ts.ejs +75 -0
- package/templates/default/scripts/vitest-config.ts@post-config_solid.ejs +67 -0
- package/templates/default/scripts/wasm-module-stub.ts.ejs +21 -0
- package/templates/default/scripts/webpack.config.ts.ejs +124 -0
- package/templates/default/scripts/webpack.config.ts@import_svelte.ejs +1 -0
- package/templates/default/scripts/webpack.config.ts@import_vue.ejs +1 -0
- package/templates/default/scripts/webpack.config.ts@import_webpack-css-extract.ejs +4 -0
- package/templates/default/scripts/webpack.config.ts@lint-webpack-default_dev-utils.ejs +1 -0
- package/templates/default/scripts/webpack.config.ts@plugin_vue.ejs +1 -0
- package/templates/default/scripts/webpack.config.ts@plugin_webpack-css-extract.ejs +4 -0
- package/templates/default/scripts/webpack.config.ts@rule_css-modules.ejs +7 -0
- package/templates/default/scripts/webpack.config.ts@rule_css.ejs +4 -0
- package/templates/default/scripts/webpack.config.ts@rule_postcss.ejs +4 -0
- package/templates/default/scripts/webpack.config.ts@rule_scss.ejs +4 -0
- package/templates/default/scripts/webpack.config.ts@rule_solid.ejs +17 -0
- package/templates/default/scripts/webpack.config.ts@rule_svelte.ejs +7 -0
- package/templates/default/scripts/webpack.config.ts@rule_tailwind.ejs +4 -0
- package/templates/default/scripts/webpack.config.ts@rule_vue.ejs +4 -0
- package/templates/default/scripts/webpack.config.ts@rule_wasm.ejs +8 -0
- package/templates/default/scripts/webpack.config.ts@ts-loader-compiler-options_vue.ejs +5 -0
- package/templates/default/scripts/webpack.config.ts@ts-loader-options_vue.ejs +5 -0
- package/templates/default/src/demo-vault-buttons.demo-vault.integration.test.ts.ejs +12 -0
- package/templates/default/src/demo-vault.no-app.integration.test.ts.ejs +18 -0
- package/templates/default/src/editor-extensions/sample-state-field.ts_dev-utils.ejs +56 -0
- package/templates/default/src/editor-extensions/sample-state-field.ts_standalone.ejs +60 -0
- package/templates/default/src/editor-extensions/sample-view-plugin.ts.ejs +66 -0
- package/templates/default/src/editor-extensions/sample-widget.ts.ejs +22 -0
- package/templates/default/src/editor-suggests/sample-editor-suggest.ts.ejs +42 -0
- package/templates/default/src/i18n/en/index.ts.ejs +10 -0
- package/templates/default/src/i18n/index.ts_i18next.ejs +21 -0
- package/templates/default/src/i18n/index.ts_typesafe-i18n.ejs +14 -0
- package/templates/default/src/i18n/locales/en.json.ejs +3 -0
- package/templates/default/src/lit-elements/sample-lit-element.ts.ejs +54 -0
- package/templates/default/src/main.test.ts.ejs +11 -0
- package/templates/default/src/main.test.ts@test-imports_vitest.ejs +6 -0
- package/templates/default/src/main.ts.ejs +4 -0
- package/templates/default/src/main.ts@import_css-modules.ejs +1 -0
- package/templates/default/src/main.ts@import_css.ejs +1 -0
- package/templates/default/src/main.ts@import_postcss.ejs +1 -0
- package/templates/default/src/main.ts@import_scss.ejs +1 -0
- package/templates/default/src/main.ts@import_tailwind.ejs +1 -0
- package/templates/default/src/modals/sample-form-modal.ts.ejs +35 -0
- package/templates/default/src/modals/sample-suggest-modal.ts.ejs +37 -0
- package/templates/default/src/plugin-settings-component.test.ts_demo.ejs +49 -0
- package/templates/default/src/plugin-settings-component.test.ts_demo@test-imports_vitest.ejs +5 -0
- package/templates/default/src/plugin-settings-component.test.ts_enhanced.ejs +41 -0
- package/templates/default/src/plugin-settings-component.test.ts_enhanced@test-imports_vitest.ejs +5 -0
- package/templates/default/src/plugin-settings-component.ts_demo.ejs +87 -0
- package/templates/default/src/plugin-settings-component.ts_enhanced.ejs +27 -0
- package/templates/default/src/plugin-settings-tab.ts_demo.ejs +286 -0
- package/templates/default/src/plugin-settings-tab.ts_enhanced.ejs +26 -0
- package/templates/default/src/plugin-settings.test.ts_demo.ejs +14 -0
- package/templates/default/src/plugin-settings.test.ts_demo@test-imports_vitest.ejs +6 -0
- package/templates/default/src/plugin-settings.ts_demo.ejs +64 -0
- package/templates/default/src/plugin-settings.ts_enhanced.ejs +3 -0
- package/templates/default/src/plugin.test.ts_jest.ejs +9 -0
- package/templates/default/src/plugin.test.ts_vitest.ejs +14 -0
- package/templates/default/src/plugin.ts_demo.ejs +316 -0
- package/templates/default/src/plugin.ts_demo@import_i18next.ejs +1 -0
- package/templates/default/src/plugin.ts_demo@import_lit.ejs +4 -0
- package/templates/default/src/plugin.ts_demo@import_preact.ejs +4 -0
- package/templates/default/src/plugin.ts_demo@import_react.ejs +4 -0
- package/templates/default/src/plugin.ts_demo@import_solid.ejs +4 -0
- package/templates/default/src/plugin.ts_demo@import_svelte.ejs +4 -0
- package/templates/default/src/plugin.ts_demo@import_typesafe-i18n.ejs +1 -0
- package/templates/default/src/plugin.ts_demo@import_vue.ejs +4 -0
- package/templates/default/src/plugin.ts_demo@import_wasm.ejs +1 -0
- package/templates/default/src/plugin.ts_demo@method_ui-view.ejs +7 -0
- package/templates/default/src/plugin.ts_demo@onload_i18next.ejs +2 -0
- package/templates/default/src/plugin.ts_demo@onload_lit.ejs +4 -0
- package/templates/default/src/plugin.ts_demo@onload_preact.ejs +4 -0
- package/templates/default/src/plugin.ts_demo@onload_react.ejs +4 -0
- package/templates/default/src/plugin.ts_demo@onload_solid.ejs +4 -0
- package/templates/default/src/plugin.ts_demo@onload_svelte.ejs +4 -0
- package/templates/default/src/plugin.ts_demo@onload_typesafe-i18n.ejs +8 -0
- package/templates/default/src/plugin.ts_demo@onload_vue.ejs +4 -0
- package/templates/default/src/plugin.ts_demo@onload_wasm.ejs +2 -0
- package/templates/default/src/plugin.ts_enhanced.ejs +72 -0
- package/templates/default/src/plugin.ts_enhanced@import2_codemirror.ejs +3 -0
- package/templates/default/src/plugin.ts_enhanced@import2_i18next.ejs +2 -0
- package/templates/default/src/plugin.ts_enhanced@import2_lit.ejs +4 -0
- package/templates/default/src/plugin.ts_enhanced@import2_preact.ejs +4 -0
- package/templates/default/src/plugin.ts_enhanced@import2_react.ejs +4 -0
- package/templates/default/src/plugin.ts_enhanced@import2_solid.ejs +4 -0
- package/templates/default/src/plugin.ts_enhanced@import2_svelte.ejs +4 -0
- package/templates/default/src/plugin.ts_enhanced@import2_typesafe-i18n.ejs +2 -0
- package/templates/default/src/plugin.ts_enhanced@import2_vue.ejs +4 -0
- package/templates/default/src/plugin.ts_enhanced@import2_wasm.ejs +1 -0
- package/templates/default/src/plugin.ts_enhanced@method_ui-view.ejs +7 -0
- package/templates/default/src/plugin.ts_enhanced@onload_codemirror.ejs +4 -0
- package/templates/default/src/plugin.ts_enhanced@onload_i18next.ejs +2 -0
- package/templates/default/src/plugin.ts_enhanced@onload_lit.ejs +4 -0
- package/templates/default/src/plugin.ts_enhanced@onload_preact.ejs +4 -0
- package/templates/default/src/plugin.ts_enhanced@onload_react.ejs +4 -0
- package/templates/default/src/plugin.ts_enhanced@onload_solid.ejs +4 -0
- package/templates/default/src/plugin.ts_enhanced@onload_svelte.ejs +4 -0
- package/templates/default/src/plugin.ts_enhanced@onload_typesafe-i18n.ejs +8 -0
- package/templates/default/src/plugin.ts_enhanced@onload_vue.ejs +4 -0
- package/templates/default/src/plugin.ts_enhanced@onload_wasm.ejs +2 -0
- package/templates/default/src/plugin.ts_standalone.ejs +56 -0
- package/templates/default/src/plugin.ts_standalone@import_codemirror.ejs +3 -0
- package/templates/default/src/plugin.ts_standalone@import_i18next.ejs +1 -0
- package/templates/default/src/plugin.ts_standalone@import_lit.ejs +4 -0
- package/templates/default/src/plugin.ts_standalone@import_preact.ejs +4 -0
- package/templates/default/src/plugin.ts_standalone@import_react.ejs +4 -0
- package/templates/default/src/plugin.ts_standalone@import_solid.ejs +4 -0
- package/templates/default/src/plugin.ts_standalone@import_svelte.ejs +4 -0
- package/templates/default/src/plugin.ts_standalone@import_typesafe-i18n.ejs +1 -0
- package/templates/default/src/plugin.ts_standalone@import_vue.ejs +4 -0
- package/templates/default/src/plugin.ts_standalone@import_wasm.ejs +1 -0
- package/templates/default/src/plugin.ts_standalone@method_ui-view.ejs +7 -0
- package/templates/default/src/plugin.ts_standalone@onload_codemirror.ejs +4 -0
- package/templates/default/src/plugin.ts_standalone@onload_i18next.ejs +2 -0
- package/templates/default/src/plugin.ts_standalone@onload_lit.ejs +4 -0
- package/templates/default/src/plugin.ts_standalone@onload_preact.ejs +4 -0
- package/templates/default/src/plugin.ts_standalone@onload_react.ejs +4 -0
- package/templates/default/src/plugin.ts_standalone@onload_solid.ejs +4 -0
- package/templates/default/src/plugin.ts_standalone@onload_svelte.ejs +4 -0
- package/templates/default/src/plugin.ts_standalone@onload_typesafe-i18n.ejs +8 -0
- package/templates/default/src/plugin.ts_standalone@onload_vue.ejs +4 -0
- package/templates/default/src/plugin.ts_standalone@onload_wasm.ejs +2 -0
- package/templates/default/src/preact-components/sample-preact-component.tsx_dev-utils.ejs +47 -0
- package/templates/default/src/preact-components/sample-preact-component.tsx_standalone.ejs +47 -0
- package/templates/default/src/react-components/sample-react-component.tsx_dev-utils.ejs +35 -0
- package/templates/default/src/react-components/sample-react-component.tsx_standalone.ejs +47 -0
- package/templates/default/src/settings.ts.ejs +32 -0
- package/templates/default/src/solid-components/sample-solid-component.tsx_dev-utils.ejs +47 -0
- package/templates/default/src/solid-components/sample-solid-component.tsx_standalone.ejs +47 -0
- package/templates/default/src/styles/css-modules.d.ts.ejs +4 -0
- package/templates/default/src/styles/main.css_dev-utils.ejs +17 -0
- package/templates/default/src/styles/main.css_dev-utils@content_tailwind.ejs +1 -0
- package/templates/default/src/styles/main.css_standalone.ejs +11 -0
- package/templates/default/src/styles/main.css_standalone@content_tailwind.ejs +1 -0
- package/templates/default/src/styles/main.module.css.ejs +3 -0
- package/templates/default/src/styles/main.scss_dev-utils.ejs +16 -0
- package/templates/default/src/styles/main.scss_standalone.ejs +10 -0
- package/templates/default/src/styles/styles.d.ts.ejs +4 -0
- package/templates/default/src/svelte-components/sample-svelte-component.d.ts.ejs +7 -0
- package/templates/default/src/svelte-components/sample-svelte-component.svelte.ejs +24 -0
- package/templates/default/src/views/sample-lit-view.ts.ejs +30 -0
- package/templates/default/src/views/sample-lit-view.ts@lint-register-element_dev-utils.ejs +1 -0
- package/templates/default/src/views/sample-preact-view.tsx_dev-utils.ejs +45 -0
- package/templates/default/src/views/sample-preact-view.tsx_standalone.ejs +42 -0
- package/templates/default/src/views/sample-react-view.tsx_dev-utils.ejs +47 -0
- package/templates/default/src/views/sample-react-view.tsx_standalone.ejs +49 -0
- package/templates/default/src/views/sample-solid-view.tsx_dev-utils.ejs +46 -0
- package/templates/default/src/views/sample-solid-view.tsx_standalone.ejs +46 -0
- package/templates/default/src/views/sample-svelte-view.ts.ejs +47 -0
- package/templates/default/src/views/sample-view.ts.ejs +37 -0
- package/templates/default/src/views/sample-vue-view.ts.ejs +34 -0
- package/templates/default/src/vue-components/sample-vue-component.d.ts.ejs +6 -0
- package/templates/default/src/vue-components/sample-vue-component.vue.ejs +25 -0
- package/templates/default/src/wasm/README.md.ejs +29 -0
- package/templates/default/src/wasm/answer.ts_esbuild.ejs +23 -0
- package/templates/default/src/wasm/answer.ts_parcel.ejs +29 -0
- package/templates/default/src/wasm/answer.ts_rollup.ejs +19 -0
- package/templates/default/src/wasm/answer.ts_vite.ejs +29 -0
- package/templates/default/src/wasm/answer.ts_webpack.ejs +29 -0
- package/templates/default/src/wasm/module.wasm +0 -0
- package/templates/default/src/wasm/module.wat.ejs +12 -0
- package/templates/default/src/wasm/sample-command.ts.ejs +33 -0
- package/templates/default/src/wasm.d.ts_esbuild.ejs +12 -0
- package/templates/default/src/wasm.d.ts_parcel.ejs +7 -0
- package/templates/default/src/wasm.d.ts_rollup.ejs +8 -0
- package/templates/default/src/wasm.d.ts_vite.ejs +8 -0
- package/templates/default/src/wasm.d.ts_webpack.ejs +7 -0
- package/templates/default/tsconfig.json_dev-utils.ejs +34 -0
- package/templates/default/tsconfig.json_dev-utils@compiler-options_i18next.ejs +1 -0
- package/templates/default/tsconfig.json_dev-utils@compiler-options_lit.ejs +2 -0
- package/templates/default/tsconfig.json_dev-utils@compiler-options_preact.ejs +2 -0
- package/templates/default/tsconfig.json_dev-utils@compiler-options_react.ejs +1 -0
- package/templates/default/tsconfig.json_dev-utils@compiler-options_solid.ejs +2 -0
- package/templates/default/tsconfig.json_dev-utils@include_has-e2e.ejs +1 -0
- package/templates/default/tsconfig.json_dev-utils@include_svelte.ejs +1 -0
- package/templates/default/tsconfig.json_dev-utils@include_vue.ejs +1 -0
- package/templates/default/tsconfig.json_dev-utils@types_jest.ejs +2 -0
- package/templates/default/tsconfig.json_dev-utils@types_svelte.ejs +2 -0
- package/templates/default/tsconfig.json_dev-utils@types_wdio-obsidian.ejs +5 -0
- package/templates/default/tsconfig.json_dev-utils@types_with-unofficial.ejs +2 -0
- package/templates/default/tsconfig.json_standalone.ejs +47 -0
- package/templates/default/tsconfig.json_standalone@compiler-options_i18next.ejs +1 -0
- package/templates/default/tsconfig.json_standalone@compiler-options_lit.ejs +2 -0
- package/templates/default/tsconfig.json_standalone@compiler-options_preact.ejs +2 -0
- package/templates/default/tsconfig.json_standalone@compiler-options_react.ejs +1 -0
- package/templates/default/tsconfig.json_standalone@compiler-options_solid.ejs +2 -0
- package/templates/default/tsconfig.json_standalone@include-extra_preact.ejs +2 -0
- package/templates/default/tsconfig.json_standalone@include-extra_react.ejs +2 -0
- package/templates/default/tsconfig.json_standalone@include-extra_solid.ejs +2 -0
- package/templates/default/tsconfig.json_standalone@include_has-e2e.ejs +1 -0
- package/templates/default/tsconfig.json_standalone@include_svelte.ejs +1 -0
- package/templates/default/tsconfig.json_standalone@include_vue.ejs +1 -0
- package/templates/default/tsconfig.json_standalone@types_jest.ejs +2 -0
- package/templates/default/tsconfig.json_standalone@types_svelte.ejs +2 -0
- package/templates/default/tsconfig.json_standalone@types_wdio-obsidian.ejs +5 -0
- package/templates/default/tsconfig.json_standalone@types_with-unofficial.ejs +2 -0
- package/templates/default/versions.json.ejs +3 -0
- package/templates/default/vite.config.ts.ejs +3 -0
- package/templates/default/vitest.config.ts_dev-utils.ejs +1 -0
- package/templates/default/vitest.config.ts_standalone.ejs +55 -0
- package/templates/default/vitest.config.ts_standalone@jsx_solid.ejs +11 -0
- package/templates/default/wdio.conf.ts.ejs +21 -0
- package/templates/default/webpack.config.ts.ejs +3 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
* text=auto eol=lf
|
|
2
|
+
|
|
3
|
+
# Emitted for every project, not only the `wasm` answer, for the same reason `pnpm-workspace.yaml` is:
|
|
4
|
+
# what a checkout may come to contain is not a property of the answers. `text=auto` above leaves a binary
|
|
5
|
+
# to git's NUL-byte heuristic, and a `.wasm` that a line-ending conversion touches is corrupt in a way
|
|
6
|
+
# nothing reports -- it stops being a module, and every bundler that reads it says so at build time.
|
|
7
|
+
*.wasm binary
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
name: Bug report
|
|
2
|
+
description: Report a bug and help improve the plugin
|
|
3
|
+
title: "[BUG] Short description of the bug"
|
|
4
|
+
labels: bug
|
|
5
|
+
assignees: <%= authorGitHubName %>
|
|
6
|
+
body:
|
|
7
|
+
- type: markdown
|
|
8
|
+
attributes:
|
|
9
|
+
value: |
|
|
10
|
+
## Bug report
|
|
11
|
+
- type: textarea
|
|
12
|
+
attributes:
|
|
13
|
+
label: Description
|
|
14
|
+
description: A clear and concise description of the bug. Include any relevant details.
|
|
15
|
+
validations:
|
|
16
|
+
required: true
|
|
17
|
+
- type: textarea
|
|
18
|
+
attributes:
|
|
19
|
+
label: Steps to Reproduce
|
|
20
|
+
description: Provide a step-by-step description.
|
|
21
|
+
value: |
|
|
22
|
+
1. Go to '...'
|
|
23
|
+
2. Click on '...'
|
|
24
|
+
3. Notice that '...'
|
|
25
|
+
...
|
|
26
|
+
validations:
|
|
27
|
+
required: true
|
|
28
|
+
- type: textarea
|
|
29
|
+
attributes:
|
|
30
|
+
label: Expected Behavior
|
|
31
|
+
description: What did you expect to happen?
|
|
32
|
+
validations:
|
|
33
|
+
required: true
|
|
34
|
+
- type: textarea
|
|
35
|
+
attributes:
|
|
36
|
+
label: Actual Behavior
|
|
37
|
+
description: What actually happened? Include error messages if available.
|
|
38
|
+
validations:
|
|
39
|
+
required: true
|
|
40
|
+
- type: textarea
|
|
41
|
+
attributes:
|
|
42
|
+
label: Environment Information
|
|
43
|
+
description: Environment Information
|
|
44
|
+
value: |
|
|
45
|
+
- **Plugin Version**: [e.g., 1.0.0]
|
|
46
|
+
- **Obsidian Version**: [e.g., v1.3.2]
|
|
47
|
+
- **Operating System**: [e.g., Windows 10]
|
|
48
|
+
validations:
|
|
49
|
+
required: true
|
|
50
|
+
- type: textarea
|
|
51
|
+
attributes:
|
|
52
|
+
label: Attachments
|
|
53
|
+
description: Required for bug reproduction
|
|
54
|
+
value: |
|
|
55
|
+
- Please attach a video showing the bug. It is not mandatory, but might be very helpful to speed up the bug fix
|
|
56
|
+
- Please attach a sample vault where the bug can be reproduced. It is not mandatory, but might be very helpful to speed up the bug fix
|
|
57
|
+
validations:
|
|
58
|
+
required: true
|
|
59
|
+
- type: checkboxes
|
|
60
|
+
attributes:
|
|
61
|
+
label: Confirmations
|
|
62
|
+
description: Ensure the following conditions are met
|
|
63
|
+
options:
|
|
64
|
+
- label: I attached a video showing the bug, or it is not necessary
|
|
65
|
+
required: true
|
|
66
|
+
- label: I attached a sample vault where the bug can be reproduced, or it is not necessary
|
|
67
|
+
required: true
|
|
68
|
+
- label: I have tested the bug with the latest version of the plugin
|
|
69
|
+
required: true
|
|
70
|
+
- label: I have checked GitHub for existing bugs
|
|
71
|
+
required: true
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
blank_issues_enabled: false
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
name: Feature request
|
|
2
|
+
description: Request a feature and help improve the plugin
|
|
3
|
+
title: "[FR] Short description of the feature"
|
|
4
|
+
labels: enhancement
|
|
5
|
+
assignees: <%= authorGitHubName %>
|
|
6
|
+
body:
|
|
7
|
+
- type: markdown
|
|
8
|
+
attributes:
|
|
9
|
+
value: |
|
|
10
|
+
## Feature Request
|
|
11
|
+
- type: textarea
|
|
12
|
+
attributes:
|
|
13
|
+
label: Description
|
|
14
|
+
description: A clear and concise description of the feature request. Include any relevant details.
|
|
15
|
+
validations:
|
|
16
|
+
required: true
|
|
17
|
+
- type: textarea
|
|
18
|
+
attributes:
|
|
19
|
+
label: Details
|
|
20
|
+
description: Provide a step-by-step description.
|
|
21
|
+
value: |
|
|
22
|
+
1. Go to '...'
|
|
23
|
+
2. Click on '...'
|
|
24
|
+
3. Notice that '...'
|
|
25
|
+
...
|
|
26
|
+
validations:
|
|
27
|
+
required: true
|
|
28
|
+
- type: textarea
|
|
29
|
+
attributes:
|
|
30
|
+
label: Desired Behavior
|
|
31
|
+
description: What do you want to happen?
|
|
32
|
+
validations:
|
|
33
|
+
required: true
|
|
34
|
+
- type: textarea
|
|
35
|
+
attributes:
|
|
36
|
+
label: Current Behavior
|
|
37
|
+
description: What actually happens?
|
|
38
|
+
validations:
|
|
39
|
+
required: true
|
|
40
|
+
- type: textarea
|
|
41
|
+
attributes:
|
|
42
|
+
label: Attachments
|
|
43
|
+
description: Required for feature investigation
|
|
44
|
+
value: |
|
|
45
|
+
- Please attach a video showing the current behavior. It is not mandatory, but might be very helpful to speed up the feature implementation
|
|
46
|
+
- Please attach a sample vault where the desired Feature Request could be applied. It is not mandatory, but might be very helpful to speed up the feature implementation
|
|
47
|
+
validations:
|
|
48
|
+
required: true
|
|
49
|
+
- type: checkboxes
|
|
50
|
+
attributes:
|
|
51
|
+
label: Confirmations
|
|
52
|
+
description: Ensure the following conditions are met
|
|
53
|
+
options:
|
|
54
|
+
- label: I attached a video showing the current behavior, or it is not necessary
|
|
55
|
+
required: true
|
|
56
|
+
- label: I attached a sample vault where the desired Feature Request could be applied, or it is not necessary
|
|
57
|
+
required: true
|
|
58
|
+
- label: I have tested the absence of the requested feature with the latest version of the plugin
|
|
59
|
+
required: true
|
|
60
|
+
- label: I have checked GitHub for existing Feature Requests
|
|
61
|
+
required: true
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
name: Attest Release Assets
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
id-token: write
|
|
9
|
+
contents: read
|
|
10
|
+
attestations: write
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
attest:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- name: Download release assets
|
|
17
|
+
env:
|
|
18
|
+
GH_TOKEN: ${{ github.token }}
|
|
19
|
+
run: gh release download "${{ github.event.release.tag_name }}" --repo "${{ github.repository }}" --dir assets
|
|
20
|
+
|
|
21
|
+
- name: Generate artifact attestation
|
|
22
|
+
uses: actions/attest@v4
|
|
23
|
+
with:
|
|
24
|
+
subject-path: assets/*
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [<%= defaultBranch %>]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [<%= defaultBranch %>]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
ci:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@v7
|
|
14
|
+
- uses: actions/setup-node@v7
|
|
15
|
+
with:
|
|
16
|
+
node-version: 24
|
|
17
|
+
cache: npm
|
|
18
|
+
- run: npm ci
|
|
19
|
+
<%- render('steps') -%>
|
|
20
|
+
- run: npm run build
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
- run: npm run lint
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
- run: npm run spellcheck
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
- run: npm run format:check
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
- run: npm run lint
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
- run: npm test
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
- run: npm run lint:md
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
- run: npm run format:check
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
- run: npm test
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- '*'
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: write
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
release:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v7
|
|
16
|
+
- uses: actions/setup-node@v7
|
|
17
|
+
with:
|
|
18
|
+
node-version: 24
|
|
19
|
+
cache: npm
|
|
20
|
+
- run: npm ci
|
|
21
|
+
- run: npm run build
|
|
22
|
+
- uses: softprops/action-gh-release@v3
|
|
23
|
+
with:
|
|
24
|
+
files: |
|
|
25
|
+
dist/build/main.js
|
|
26
|
+
dist/build/manifest.json
|
|
27
|
+
dist/build/styles.css
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
name: Update LICENSE Year
|
|
2
|
+
|
|
3
|
+
# `obsidianmd/validate-license` compares the LICENSE copyright year against the current year at lint
|
|
4
|
+
# time, so every repo it runs in turns red the moment the year rolls over. This bumps the end year on
|
|
5
|
+
# 1 January so that never happens.
|
|
6
|
+
|
|
7
|
+
on:
|
|
8
|
+
schedule:
|
|
9
|
+
- cron: '0 0 1 1 *'
|
|
10
|
+
workflow_dispatch:
|
|
11
|
+
|
|
12
|
+
permissions:
|
|
13
|
+
contents: write
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
update-year:
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
steps:
|
|
19
|
+
- name: Check out the repository
|
|
20
|
+
uses: actions/checkout@v6
|
|
21
|
+
|
|
22
|
+
- name: Bump the copyright end year
|
|
23
|
+
id: bump
|
|
24
|
+
run: |
|
|
25
|
+
YEAR="$(date -u +%Y)" perl -i -pe 's/^(\s*Copyright \([Cc]\) )(\d{4})(?:-\d{4})?( )/$1 . $2 . ($2 eq $ENV{YEAR} ? "" : "-$ENV{YEAR}") . $3/e' LICENSE
|
|
26
|
+
if git diff --quiet -- LICENSE; then
|
|
27
|
+
echo "changed=false" >> "$GITHUB_OUTPUT"
|
|
28
|
+
else
|
|
29
|
+
echo "changed=true" >> "$GITHUB_OUTPUT"
|
|
30
|
+
fi
|
|
31
|
+
|
|
32
|
+
- name: Commit and push
|
|
33
|
+
if: steps.bump.outputs.changed == 'true'
|
|
34
|
+
run: |
|
|
35
|
+
git config user.name "github-actions[bot]"
|
|
36
|
+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
37
|
+
git commit -m "chore: update LICENSE copyright year" -- LICENSE
|
|
38
|
+
git push
|
|
@@ -0,0 +1,27 @@
|
|
|
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
|
|
23
|
+
|
|
24
|
+
# Build output
|
|
25
|
+
dist
|
|
26
|
+
.env
|
|
27
|
+
/tsconfig.tsbuildinfo
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
styles.css
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
npx --no -- commitlint --edit "$1"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
npx --no -- nano-staged
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
tag-version-prefix=""
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "@parcel/config-default",
|
|
3
|
+
"transformers": {
|
|
4
|
+
<%- render('transformers') -%>
|
|
5
|
+
"*.{js,mjs,cjs,jsx,ts,mts,cts,tsx}": ["./parcel-transformer-inline-imports.cjs", "..."]
|
|
6
|
+
},
|
|
7
|
+
"namers": ["./parcel-namer-obsidian.cjs", "..."],
|
|
8
|
+
"resolvers": ["./parcel-resolver-obsidian.cjs", "..."]
|
|
9
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"*.svelte": ["./parcel-transformer-svelte.cjs"],
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
dist
|
|
2
|
+
node_modules
|
|
3
|
+
*-lock.json
|
|
4
|
+
|
|
5
|
+
# The demo vault is documentation: its scripts show unusual module and `require` styles on purpose,
|
|
6
|
+
# and its `.obsidian` files are compared byte-for-byte by the demo-vault coverage suite.
|
|
7
|
+
demo-vault
|
|
8
|
+
|
|
9
|
+
# Markdown belongs to markdownlint.
|
|
10
|
+
*.md
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
Contributions are welcome! Here's how to get started.
|
|
4
|
+
|
|
5
|
+
## Prerequisites
|
|
6
|
+
|
|
7
|
+
- [Node.js](https://nodejs.org/) (latest LTS recommended)
|
|
8
|
+
- npm (comes with Node.js)
|
|
9
|
+
|
|
10
|
+
## Setup
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
git clone https://github.com/<%= authorGitHubName %>/obsidian-<%= pluginId %>.git
|
|
14
|
+
cd obsidian-<%= pluginId %>
|
|
15
|
+
npm install
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Development Workflow
|
|
19
|
+
|
|
20
|
+
### Dev Mode
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
npm run dev
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Copy `dist/main.js`, `dist/manifest.json`, and `dist/styles.css` to your vault's `.obsidian/plugins/<%= pluginId %>/` directory, or set the `OBSIDIAN_CONFIG_FOLDER` variable in `.env` to auto-copy on build.
|
|
27
|
+
|
|
28
|
+
### Build
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
npm run build
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Available Scripts
|
|
35
|
+
|
|
36
|
+
- `npm run dev` — Build in watch mode for development
|
|
37
|
+
- `npm run build` — Production build
|
|
38
|
+
- `npm run version` — Bump version and update `manifest.json` / `versions.json`
|
|
39
|
+
<%- render('scripts') -%>
|
|
40
|
+
<%- render('demo-vault') -%>
|
|
41
|
+
|
|
42
|
+
## Configuration
|
|
43
|
+
|
|
44
|
+
This project was scaffolded with [`create-obsidian-plugin`](https://github.com/mnaoumov/create-obsidian-plugin). Run `npx @mnaoumov/create-obsidian-plugin` again in the project directory to update configuration.
|
|
45
|
+
|
|
46
|
+
## Pull Requests
|
|
47
|
+
|
|
48
|
+
- Ensure the checks the project defines above still pass.
|
|
49
|
+
- Use [Conventional Commits](https://www.conventionalcommits.org/) for your commit messages.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
|
|
2
|
+
## Demo vault
|
|
3
|
+
|
|
4
|
+
`demo-vault/` is this plugin's documentation: a real Obsidian vault whose notes explain each feature and demonstrate it with `code-button`s that run TypeScript through [CodeScript Toolkit](https://github.com/mnaoumov/obsidian-codescript-toolkit). `npm run version` archives it into the GitHub release, injecting the freshly built plugin and the `demo-vault-helper` bootstrap plugin into the archived copy — so nothing plugin-related is committed under `demo-vault/.obsidian/plugins/`.
|
|
5
|
+
|
|
6
|
+
When you add a user-facing feature, add or update its note in the same change.
|
|
7
|
+
|
|
8
|
+
### One-time setup before the button suite can run
|
|
9
|
+
|
|
10
|
+
`npm run test:integration:demo-vault` opens a copy of `demo-vault/` in a real Obsidian and clicks every button in it. It needs the CodeScript Toolkit binary, which it copies out of your own `demo-vault/` to keep the run hermetic. Open `demo-vault/` in Obsidian once and let `demo-vault-helper` install CodeScript Toolkit; the installed copy is gitignored, so each machine does this for itself. Until then the suite fails with a message telling you exactly this.
|
|
11
|
+
|
|
12
|
+
### Checking the vault
|
|
13
|
+
|
|
14
|
+
- `npm run test:integration:no-app` — the coverage suite. Reads the notes without launching Obsidian and enforces the authoring rules: an `# H1` and a prose opener per note, Markdown links rather than wikilinks, no `[Docs]` line, every note reachable from `00 Start.md`.
|
|
15
|
+
- `npm run test:integration:demo-vault` — the button suite. A button fails at click time, so this is the only gate that can catch a broken one.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
- `npm run format` — Format code
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
- `npm run lint` — Run linter
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
- `npm run commit` — Commit with a guided Conventional Commits prompt
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
- `npm run spellcheck` — Check spelling
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
- `npm run gate` — Run every check the release runs (format, spelling, Markdown, build, lint, tests), before committing
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
- `npm run format` — Format code
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
- `npm run lint` — Run linter
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
- `npm test` — Run tests (unit tests run against [`obsidian-test-mocks`](https://www.npmjs.com/package/obsidian-test-mocks); `.svelte` / `.vue` components are stubbed, so render them in an integration test instead)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
- `npm run lint:md` — Lint Markdown files
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
- `npm run format` — Format code
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
- `npm test` — Run tests (unit tests run against [`obsidian-test-mocks`](https://www.npmjs.com/package/obsidian-test-mocks); `.svelte` / `.vue` components are stubbed, so render them in an integration test instead)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) <%= currentYear %> <%= authorName %>
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# <%= pluginName %>
|
|
2
|
+
|
|
3
|
+
<%- _badges.join(' ') %>
|
|
4
|
+
|
|
5
|
+
<%= pluginDescription %>
|
|
6
|
+
<%- render('demo-vault') -%>
|
|
7
|
+
|
|
8
|
+
## Installation
|
|
9
|
+
|
|
10
|
+
The plugin is not available in [the official Community Plugins repository](https://community.obsidian.md) yet.
|
|
11
|
+
|
|
12
|
+
### Beta versions
|
|
13
|
+
|
|
14
|
+
To install the latest beta release of this plugin (regardless if it is available in [the official Community Plugins repository](https://community.obsidian.md) or not), follow these steps:
|
|
15
|
+
|
|
16
|
+
1. Ensure you have the [BRAT plugin](https://community.obsidian.md/plugins/obsidian42-brat) installed and enabled.
|
|
17
|
+
2. Click [Install via BRAT](https://intradeus.github.io/http-protocol-redirector?r=obsidian://brat?plugin=https://github.com/<%= authorGitHubName %>/obsidian-<%= pluginId %>).
|
|
18
|
+
3. An Obsidian pop-up window should appear. In the window, click the `Add plugin` button once and wait a few seconds for the plugin to install.
|
|
19
|
+
<%- render('preset') -%>
|
|
20
|
+
|
|
21
|
+
## Contributing
|
|
22
|
+
|
|
23
|
+
Contributions are welcome — see [CONTRIBUTING](./CONTRIBUTING.md) to get set up.
|
|
24
|
+
<%- render('support') -%>
|
|
25
|
+
|
|
26
|
+
## License
|
|
27
|
+
|
|
28
|
+
© [<%= authorName %>](https://github.com/<%= authorGitHubName %>/)
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
|
|
2
|
+
## Demo vault
|
|
3
|
+
|
|
4
|
+
**The documentation is a demo vault.** Every feature has a note that explains what it does and why you would want it, with a button you can press to watch it happen.
|
|
5
|
+
|
|
6
|
+
**[Start reading here](<./demo-vault/00 Start.md>)** — it is plain markdown, so it works on GitHub with nothing installed.
|
|
7
|
+
|
|
8
|
+
A copy of the vault ships with every release. You can access it via any of the following:
|
|
9
|
+
|
|
10
|
+
1. Running the **<%= pluginName %>: Open demo vault** command.
|
|
11
|
+
2. Downloading `<%= pluginId %>-demo-vault.zip` from the [Releases](https://github.com/<%= authorGitHubName %>/obsidian-<%= pluginId %>/releases). It unzips into a single `<%= pluginId %>-demo-vault-<version>` folder.
|
|
12
|
+
3. Browsing its source in [`demo-vault/`](./demo-vault/README.md) in this repository.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
|
|
2
|
+
## Debugging
|
|
3
|
+
|
|
4
|
+
By default, debug messages for this plugin are hidden.
|
|
5
|
+
|
|
6
|
+
To show them, run the following command in the `DevTools Console`:
|
|
7
|
+
|
|
8
|
+
```js
|
|
9
|
+
window.DEBUG.enable('<%= pluginId %>');
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
For more details, refer to the [documentation](https://mnaoumov.dev/obsidian-dev-utils/guides/debugging/).
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<%# Parcel only, for Solid: its own JavaScript transformer compiles JSX as a React-style automatic runtime -%>
|
|
2
|
+
<%# against `solid-js/jsx-runtime`, which exports no `jsx`, so Solid's JSX has to go through -%>
|
|
3
|
+
<%# `babel-preset-solid` first. Parcel runs a project babel config ahead of its own transformer, which -%>
|
|
4
|
+
<%# still strips the TypeScript. JSON rather than rollup's `babel.config.mjs` wrapper, because Parcel -%>
|
|
5
|
+
<%# warns on every build that a JavaScript babel config can be neither watched nor cached. -%>
|
|
6
|
+
{
|
|
7
|
+
"presets": ["babel-preset-solid"]
|
|
8
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
|
|
3
|
+
"linter": {
|
|
4
|
+
"enabled": true,
|
|
5
|
+
"rules": {
|
|
6
|
+
"preset": "recommended",
|
|
7
|
+
"complexity": {
|
|
8
|
+
// TypeScript's `noPropertyAccessFromIndexSignature` REQUIRES `process.env['BUILD']` and rejects
|
|
9
|
+
// the dotted form this rule asks for. The two tools disagree about the same line; the compiler
|
|
10
|
+
// wins, because its complaint is an error and this one is a preference.
|
|
11
|
+
"useLiteralKeys": "off"
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"formatter": {
|
|
16
|
+
"indentStyle": "space",
|
|
17
|
+
"indentWidth": 2
|
|
18
|
+
},
|
|
19
|
+
"javascript": {
|
|
20
|
+
"formatter": {
|
|
21
|
+
"quoteStyle": "single",
|
|
22
|
+
"trailingCommas": "none"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"json": {
|
|
26
|
+
"formatter": {
|
|
27
|
+
"trailingCommas": "none"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"files": {
|
|
31
|
+
"includes": ["**", "!**/dist", "!**/node_modules", "!**/demo-vault", "!**/*-lock.json"]
|
|
32
|
+
},
|
|
33
|
+
"overrides": [
|
|
34
|
+
{
|
|
35
|
+
// Biome reads a single-file component's `<script>` block but not its markup, so every binding the
|
|
36
|
+
// template uses looks unused to it.
|
|
37
|
+
"includes": ["**/*.svelte", "**/*.vue"],
|
|
38
|
+
"linter": {
|
|
39
|
+
"rules": {
|
|
40
|
+
"correctness": {
|
|
41
|
+
"noUnusedVariables": "off"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
]
|
|
47
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { config as default } from './scripts/commitlint-config.ts';
|