From 363fcde8c1245e10ec7eba5bff9eaa8a0f85a56e Mon Sep 17 00:00:00 2001 From: saberzero1 Date: Sat, 14 Mar 2026 22:01:15 +0100 Subject: [PATCH] chore: commit dist/ and remove prepare script Pre-built output is now committed to the repository so that Quartz can skip the build step during plugin installation. The prepare script is removed to prevent redundant builds when installing from npm/git. --- .gitignore | 1 - dist/index.d.ts | 6 ++++++ dist/index.js | 13 +++++++++++++ dist/index.js.map | 1 + package-lock.json | 7 +++---- package.json | 1 - 6 files changed, 23 insertions(+), 6 deletions(-) create mode 100644 dist/index.d.ts create mode 100644 dist/index.js create mode 100644 dist/index.js.map diff --git a/.gitignore b/.gitignore index 657842b..ef88793 100644 --- a/.gitignore +++ b/.gitignore @@ -4,7 +4,6 @@ node_modules/ .pnp.js # Build output -dist/ build/ *.tsbuildinfo diff --git a/dist/index.d.ts b/dist/index.d.ts new file mode 100644 index 0000000..6818ee9 --- /dev/null +++ b/dist/index.d.ts @@ -0,0 +1,6 @@ +import { QuartzFilterPlugin } from '@quartz-community/types'; +export { QuartzFilterPlugin } from '@quartz-community/types'; + +declare const RemoveDrafts: QuartzFilterPlugin; + +export { RemoveDrafts }; diff --git a/dist/index.js b/dist/index.js new file mode 100644 index 0000000..5705e69 --- /dev/null +++ b/dist/index.js @@ -0,0 +1,13 @@ +// src/filter.ts +var RemoveDrafts = () => ({ + name: "RemoveDrafts", + shouldPublish(_ctx, [_tree, vfile]) { + const frontmatter = vfile.data?.frontmatter; + const draftFlag = frontmatter?.draft === true || frontmatter?.draft === "true"; + return !draftFlag; + } +}); + +export { RemoveDrafts }; +//# sourceMappingURL=index.js.map +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/index.js.map b/dist/index.js.map new file mode 100644 index 0000000..434fbfd --- /dev/null +++ b/dist/index.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../src/filter.ts"],"names":[],"mappings":";AAEO,IAAM,eAA2C,OAAO;AAAA,EAC7D,IAAA,EAAM,cAAA;AAAA,EACN,aAAA,CAAc,IAAA,EAAM,CAAC,KAAA,EAAO,KAAK,CAAA,EAAG;AAClC,IAAA,MAAM,WAAA,GAAc,MAAM,IAAA,EAAM,WAAA;AAChC,IAAA,MAAM,SAAA,GAAqB,WAAA,EAAa,KAAA,KAAU,IAAA,IAAQ,aAAa,KAAA,KAAU,MAAA;AACjF,IAAA,OAAO,CAAC,SAAA;AAAA,EACV;AACF,CAAA","file":"index.js","sourcesContent":["import type { QuartzFilterPlugin } from \"@quartz-community/types\";\n\nexport const RemoveDrafts: QuartzFilterPlugin = () => ({\n name: \"RemoveDrafts\",\n shouldPublish(_ctx, [_tree, vfile]) {\n const frontmatter = vfile.data?.frontmatter as Record | undefined;\n const draftFlag: boolean = frontmatter?.draft === true || frontmatter?.draft === \"true\";\n return !draftFlag;\n },\n});\n"]} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 4490eb0..f48ee30 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,9 +9,7 @@ "version": "0.1.0", "license": "MIT", "dependencies": { - "@quartz-community/types": "github:quartz-community/types", - "tsup": "^8.5.0", - "typescript": "^5.9.3" + "@quartz-community/types": "github:quartz-community/types" }, "devDependencies": { "@types/node": "^24.10.0", @@ -20,6 +18,8 @@ "eslint": "^8.57.0", "eslint-config-prettier": "^9.1.0", "prettier": "^3.6.2", + "tsup": "^8.5.0", + "typescript": "^5.9.3", "vitest": "^2.1.9" }, "engines": { @@ -2855,7 +2855,6 @@ } ], "license": "MIT", - "peer": true, "dependencies": { "nanoid": "^3.3.11", "picocolors": "^1.1.1", diff --git a/package.json b/package.json index 7324a0e..9140aba 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,6 @@ "sideEffects": false, "scripts": { "build": "tsup", - "prepare": "npm run build", "dev": "tsup --watch", "lint": "eslint . --max-warnings=0", "format": "prettier . --check",