From 25372276789764c688b170fdc478b69f88c5b2f0 Mon Sep 17 00:00:00 2001 From: Aleix Soler Date: Wed, 18 Mar 2026 16:58:41 +0100 Subject: [PATCH] chore: cleanup unused code and enhance marketplace author links --- README.md | 5 ++- .../SettingsUI/MarketplaceBrowseModal.tsx | 16 +++++++++- constants/predefinedTemplates.ts | 5 --- package.json | 4 +-- scripts/generate-templates.mjs | 32 ------------------- 5 files changed, 19 insertions(+), 43 deletions(-) delete mode 100644 scripts/generate-templates.mjs diff --git a/README.md b/README.md index d3b88f0..4257f6f 100644 --- a/README.md +++ b/README.md @@ -113,10 +113,9 @@ You can contribute your own status templates to the plugin! ] } ``` -4. Run `node scripts/generate-templates.mjs` to update the predefined templates. -5. Submit a Pull Request! +4. Submit a Pull Request with your JSON file! -Once accepted, your template will be available to all users of the plugin. +Once accepted, maintainers will include your template in the next plugin update. ## Installation diff --git a/components/SettingsUI/MarketplaceBrowseModal.tsx b/components/SettingsUI/MarketplaceBrowseModal.tsx index 578568e..b25ede2 100644 --- a/components/SettingsUI/MarketplaceBrowseModal.tsx +++ b/components/SettingsUI/MarketplaceBrowseModal.tsx @@ -59,7 +59,21 @@ export const MarketplaceBrowseModal: React.FC = ({ {template.author && (
- by {template.author} + by{" "} + {template.github ? ( + + e.stopPropagation() + } + > + {template.author} + + ) : ( + template.author + )}
)} diff --git a/constants/predefinedTemplates.ts b/constants/predefinedTemplates.ts index 62e0e77..73acad1 100644 --- a/constants/predefinedTemplates.ts +++ b/constants/predefinedTemplates.ts @@ -249,8 +249,3 @@ export const PREDEFINED_TEMPLATES: StatusTemplate[] = [ ], }, ]; - -/** - * Default template IDs that should be enabled by default - */ -export const DEFAULT_ENABLED_TEMPLATES = ["colorful"]; diff --git a/package.json b/package.json index 25237e4..bf836e7 100644 --- a/package.json +++ b/package.json @@ -4,8 +4,8 @@ "description": "Enhance your note organization with a status management system. Assign and track statuses (active, on hold, completed, dropped) for your notes with a customizable interface including status pane, dropdown, and file explorer integration.", "main": "main.js", "scripts": { - "dev": "node scripts/generate-templates.mjs && node esbuild.config.mjs", - "build": "node scripts/generate-templates.mjs && tsc -noEmit -skipLibCheck && node esbuild.config.mjs production", + "dev": "node esbuild.config.mjs", + "build": "tsc -noEmit -skipLibCheck && node esbuild.config.mjs production", "version": "node version-bump.mjs && git add manifest.json versions.json", "format": "prettier --write \"**/*.{ts,tsx,js,jsx,json,css,md}\"", "format:check": "prettier --check \"**/*.{ts,tsx,js,jsx,json,css,md}\"", diff --git a/scripts/generate-templates.mjs b/scripts/generate-templates.mjs deleted file mode 100644 index 758bca9..0000000 --- a/scripts/generate-templates.mjs +++ /dev/null @@ -1,32 +0,0 @@ -import fs from 'fs'; -import path from 'path'; - -const templatesDir = './templates'; -const outputFile = './constants/predefinedTemplates.ts'; - -const files = fs.readdirSync(templatesDir); -const templates = []; - -files.forEach(file => { - if (file.endsWith('.json')) { - const filePath = path.join(templatesDir, file); - const content = JSON.parse(fs.readFileSync(filePath, 'utf8')); - templates.push(content); - } -}); - -const content = `import { StatusTemplate } from "types/pluginSettings"; - -/** - * Predefined status templates generated from the templates directory - */ -export const PREDEFINED_TEMPLATES: StatusTemplate[] = ${JSON.stringify(templates, null, '\t')}; - -/** - * Default template IDs that should be enabled by default - */ -export const DEFAULT_ENABLED_TEMPLATES = ["colorful"]; -`; - -fs.writeFileSync(outputFile, content); -console.log(`Generated ${outputFile} with ${templates.length} templates.`);