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.
This commit is contained in:
saberzero1 2026-03-14 22:01:15 +01:00
parent 1d6f78bb49
commit 363fcde8c1
No known key found for this signature in database
6 changed files with 23 additions and 6 deletions

1
.gitignore vendored
View file

@ -4,7 +4,6 @@ node_modules/
.pnp.js
# Build output
dist/
build/
*.tsbuildinfo

6
dist/index.d.ts vendored Normal file
View file

@ -0,0 +1,6 @@
import { QuartzFilterPlugin } from '@quartz-community/types';
export { QuartzFilterPlugin } from '@quartz-community/types';
declare const RemoveDrafts: QuartzFilterPlugin<object>;
export { RemoveDrafts };

13
dist/index.js vendored Normal file
View file

@ -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

1
dist/index.js.map vendored Normal file
View file

@ -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<object> = () => ({\n name: \"RemoveDrafts\",\n shouldPublish(_ctx, [_tree, vfile]) {\n const frontmatter = vfile.data?.frontmatter as Record<string, unknown> | undefined;\n const draftFlag: boolean = frontmatter?.draft === true || frontmatter?.draft === \"true\";\n return !draftFlag;\n },\n});\n"]}

7
package-lock.json generated
View file

@ -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",

View file

@ -34,7 +34,6 @@
"sideEffects": false,
"scripts": {
"build": "tsup",
"prepare": "npm run build",
"dev": "tsup --watch",
"lint": "eslint . --max-warnings=0",
"format": "prettier . --check",