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 21:58:29 +01:00
parent d2d095d909
commit 87cc7d6d9e
No known key found for this signature in database
12 changed files with 500 additions and 6 deletions

1
.gitignore vendored
View file

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

2
dist/components/index.d.ts vendored Normal file
View file

@ -0,0 +1,2 @@
export { Explorer, ExplorerOptions } from '../index.js';
import '@quartz-community/types';

212
dist/components/index.js vendored Normal file

File diff suppressed because one or more lines are too long

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

File diff suppressed because one or more lines are too long

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

@ -0,0 +1,23 @@
import { QuartzComponent } from '@quartz-community/types';
interface FileTrieNode {
slugSegment?: string;
slugSegments?: string[];
displayName?: string;
isFolder: boolean;
data: Record<string, unknown> | null;
children: FileTrieNode[];
}
interface ExplorerOptions {
title?: string;
folderDefaultState: "collapsed" | "open";
folderClickBehavior: "collapse" | "link";
useSavedState: boolean;
sortFn?: (a: FileTrieNode, b: FileTrieNode) => number;
filterFn?: (node: FileTrieNode) => boolean;
mapFn?: (node: FileTrieNode) => FileTrieNode;
order?: Array<"filter" | "map" | "sort">;
}
declare const _default: (userOpts?: Partial<ExplorerOptions>) => QuartzComponent;
export { _default as Explorer, type ExplorerOptions };

212
dist/index.js vendored Normal file

File diff suppressed because one or more lines are too long

1
dist/index.js.map vendored Normal file

File diff suppressed because one or more lines are too long

42
dist/types.d.ts vendored Normal file
View file

@ -0,0 +1,42 @@
export { BuildCtx, CSSResource, ChangeEvent, JSResource, ProcessedContent, QuartzEmitterPlugin, QuartzEmitterPluginInstance, QuartzFilterPlugin, QuartzFilterPluginInstance, QuartzPluginData, QuartzTransformerPlugin, QuartzTransformerPluginInstance, StaticResources } from '@quartz-community/types';
interface ExampleTransformerOptions {
/** Token used to highlight text, defaults to ==highlight== */
highlightToken: string;
/** Add a CSS class to all headings in the rendered HTML. */
headingClass: string;
/** Enable remark-gfm for tables/task lists. */
enableGfm: boolean;
/** Enable adding slug IDs to headings. */
addHeadingSlugs: boolean;
}
interface ExampleFilterOptions {
/** Allow pages marked draft: true to publish. */
allowDrafts: boolean;
/** Exclude pages that contain any of these frontmatter tags. */
excludeTags: string[];
/** Exclude paths that start with any of these prefixes (relative to content root). */
excludePathPrefixes: string[];
}
interface ExampleEmitterOptions {
/** Filename to emit at the site root. */
manifestSlug: string;
/** Whether to include the frontmatter block in the manifest. */
includeFrontmatter: boolean;
/** Extra metadata to write at the top level of the manifest. */
metadata: Record<string, unknown>;
/** Optional hook to transform the emitted manifest JSON string. */
transformManifest?: (json: string) => string;
/** Add a custom class to the emitted manifest <script> tag if used in HTML. */
manifestScriptClass?: string;
}
interface ExampleComponentOptions {
/** Text to prefix before the title */
prefix?: string;
/** Text to suffix after the title */
suffix?: string;
/** CSS class name to apply */
className?: string;
}
export type { ExampleComponentOptions, ExampleEmitterOptions, ExampleFilterOptions, ExampleTransformerOptions };

3
dist/types.js vendored Normal file
View file

@ -0,0 +1,3 @@
//# sourceMappingURL=types.js.map
//# sourceMappingURL=types.js.map

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

@ -0,0 +1 @@
{"version":3,"sources":[],"names":[],"mappings":"","file":"types.js"}

7
package-lock.json generated
View file

@ -10,9 +10,7 @@
"license": "MIT",
"dependencies": {
"@quartz-community/types": "github:quartz-community/types",
"@quartz-community/utils": "github:quartz-community/utils",
"tsup": "^8.5.0",
"typescript": "^5.9.3"
"@quartz-community/utils": "github:quartz-community/utils"
},
"devDependencies": {
"@types/hast": "^3.0.4",
@ -25,6 +23,8 @@
"preact": "^10.28.2",
"prettier": "^3.6.2",
"sass": "^1.97.3",
"tsup": "^8.5.0",
"typescript": "^5.9.3",
"vitest": "^2.1.9"
},
"engines": {
@ -4045,7 +4045,6 @@
}
],
"license": "MIT",
"peer": true,
"dependencies": {
"nanoid": "^3.3.11",
"picocolors": "^1.1.1",

View file

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