-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support to compile with mako (#2123)
* feat: mako finish * fix: techStacks miss * fix: lint * fix: test * fix: disable mako for test * fix: watch-parent use null-loader * fix: path * chore: remove hashAnchor * fix: remove mako for ci * feat: update umi version * fix: reset lock * build: release 2.4.0-alpha.1 * fix: page frontmatter lost from route meta (#2129) * fix: merge route.metas to metas * chore: change value * build: release 2.3.5 * fix: nav title cannot work in singe 2-level directory (#2116) * fix: page frontmatter (#2130) * build: release 2.3.6 * refactor: getMetaByRouteId return metainfo for all routes (#2134) * refactor: getMetaByRouteId return metainfo for all routes * fix: frontmatter is an object * fix: 分号 * fix: prefer color * fix: prefer color * build: release 2.4.0-alpha.2 * chore: hooks to plugins * chore: init mako error demo * fix: post-loader for dumi-raw * chore: change config * chore: add empty line * chore(deps): update umi version * fix: dumi compiler before mako --------- Co-authored-by: Zhou Bill <735051883@qq.com> Co-authored-by: andybuibui <917655399@qq.com>
- Loading branch information
1 parent
dbe6542
commit ac9e25e
Showing
32 changed files
with
4,122 additions
and
1,146 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
/// <reference types="node" /> | ||
|
||
export declare interface ExtendedLoaderContext { | ||
context: string | null; | ||
loaderIndex: number; | ||
loaders: Loader[]; | ||
resourcePath: string | undefined; | ||
resourceQuery: string | undefined; | ||
async: (() => (() => void) | undefined) | null; | ||
callback: (() => void) | null; | ||
cacheable: (flag: boolean) => void; | ||
dependency: (file: string) => void; | ||
addDependency: (file: string) => void; | ||
addContextDependency: (context: string) => void; | ||
getDependencies: () => string[]; | ||
getContextDependencies: () => string[]; | ||
clearDependencies: () => void; | ||
resource: string; | ||
request: string; | ||
remainingRequest: string; | ||
currentRequest: string; | ||
previousRequest: string; | ||
query: { | ||
[key: string]: any; | ||
} | string; | ||
data: any; | ||
} | ||
|
||
export declare function getContext(resource: string): string; | ||
|
||
export declare interface Loader { | ||
path: string; | ||
query: string; | ||
request: string; | ||
options: any; | ||
normal: null | ((request: string) => string); | ||
pitch: null | ((request: string) => string); | ||
raw: string; | ||
data: any; | ||
pitchExecuted: boolean; | ||
normalExecuted: boolean; | ||
} | ||
|
||
export declare interface RunLoaderOption { | ||
resource: string; | ||
loaders: any[]; | ||
context: any; | ||
readResource: ( | ||
filename: string, | ||
callback: (err: NodeJS.ErrnoException | null, data: Buffer | null) => void, | ||
) => void; | ||
} | ||
|
||
export declare interface RunLoaderResult { | ||
result?: Array<Buffer | null> | undefined; | ||
resourceBuffer?: Buffer | null | undefined; | ||
cacheable: boolean; | ||
fileDependencies: string[]; | ||
contextDependencies: string[]; | ||
} | ||
|
||
export declare function runLoaders( | ||
options: RunLoaderOption, | ||
callback: (err: NodeJS.ErrnoException | null, result: RunLoaderResult) => any, | ||
): void; | ||
|
||
export { } |
Oops, something went wrong.