mirror of
https://github.com/garrytan/gstack.git
synced 2026-05-18 10:31:30 +08:00
feat(resolvers): add MAKE_PDF_SETUP + makePdfDir host paths
Skill templates can now embed {{MAKE_PDF_SETUP}} to resolve $P to the
make-pdf binary via the same discovery order as $B / $D: env override
(MAKE_PDF_BIN), local skill root, global install, or PATH.
Mirrors the pattern established by generateBrowseSetup() and
generateDesignSetup() in scripts/resolvers/design.ts.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -13,6 +13,7 @@ export interface HostPaths {
|
||||
binDir: string;
|
||||
browseDir: string;
|
||||
designDir: string;
|
||||
makePdfDir: string;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -30,6 +31,7 @@ function buildHostPaths(): Record<string, HostPaths> {
|
||||
binDir: '$GSTACK_BIN',
|
||||
browseDir: '$GSTACK_BROWSE',
|
||||
designDir: '$GSTACK_DESIGN',
|
||||
makePdfDir: '$GSTACK_MAKE_PDF',
|
||||
};
|
||||
} else {
|
||||
const root = `~/${config.globalRoot}`;
|
||||
@@ -39,6 +41,7 @@ function buildHostPaths(): Record<string, HostPaths> {
|
||||
binDir: `${root}/bin`,
|
||||
browseDir: `${root}/browse/dist`,
|
||||
designDir: `${root}/design/dist`,
|
||||
makePdfDir: `${root}/make-pdf/dist`,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user