Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support to compile with mako #2123

Merged
merged 30 commits into from
Jun 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
ef3bf89
feat: mako finish
Jinbao1001 May 22, 2024
8e029a1
fix: techStacks miss
Jinbao1001 May 22, 2024
0073fb3
fix: lint
Jinbao1001 May 22, 2024
7d9d1c6
fix: test
Jinbao1001 May 27, 2024
9e574f1
fix: disable mako for test
Jinbao1001 May 27, 2024
5ad62f3
fix: watch-parent use null-loader
Jinbao1001 May 27, 2024
fdbe1e9
fix: path
Jinbao1001 May 27, 2024
3fec8e9
chore: remove hashAnchor
Jinbao1001 May 27, 2024
f04a57a
fix: remove mako for ci
Jinbao1001 May 27, 2024
853322e
fix: conflict
Jinbao1001 May 27, 2024
3aa33bf
feat: update umi version
Jinbao1001 May 27, 2024
1d74e7a
fix: reset lock
Jinbao1001 May 27, 2024
97afec2
build: release 2.4.0-alpha.1
Jinbao1001 May 27, 2024
3448810
fix: page frontmatter lost from route meta (#2129)
Jinbao1001 May 29, 2024
365e513
build: release 2.3.5
Jinbao1001 May 29, 2024
ea40793
fix: nav title cannot work in singe 2-level directory (#2116)
Zhou-Bill May 30, 2024
82d876b
fix: page frontmatter (#2130)
andybuibui May 30, 2024
1e98477
build: release 2.3.6
Jinbao1001 May 30, 2024
8fa976d
refactor: getMetaByRouteId return metainfo for all routes (#2134)
Jinbao1001 Jun 3, 2024
8149332
fix: prefer color
Jinbao1001 Jun 3, 2024
a19ca6e
fix: prefer color
Jinbao1001 Jun 3, 2024
3fba7e2
fix: prefer color
Jinbao1001 Jun 3, 2024
1996802
build: release 2.4.0-alpha.2
Jinbao1001 Jun 3, 2024
aa19fbd
chore: hooks to plugins
Jinbao1001 Jun 5, 2024
5677e4e
chore: init mako error demo
Jinbao1001 Jun 12, 2024
992fd73
fix: post-loader for dumi-raw
Jinbao1001 Jun 25, 2024
350eb63
chore: change config
Jinbao1001 Jun 25, 2024
b6ca6cf
chore: add empty line
Jinbao1001 Jun 25, 2024
dd9828b
chore(deps): update umi version
Jinbao1001 Jun 27, 2024
780cd0f
fix: dumi compiler before mako
Jinbao1001 Jun 27, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .dumirc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { version } from './package.json';

export default defineConfig({
html2sketch: {},
mako: {},
favicons: [
'https://gw.alipayobjects.com/zos/bmw-prod/d3e3eb39-1cd7-4aa5-827c-877deced6b7e/lalxt4g3_w256_h256.png',
],
Expand All @@ -24,7 +25,9 @@ Powered by self`,
github: 'https://github.com/umijs/dumi',
},
},
...(process.env.NODE_ENV === 'development' ? {} : { ssr: {} }),
...(process.env.NODE_ENV === 'development'
? {}
: { ssr: { builder: 'mako' } }),
analytics: {
ga_v2: 'G-GX2S89BMXB',
},
Expand Down
1 change: 1 addition & 0 deletions .stylelintrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"extends": "@umijs/lint/dist/config/stylelint",
"ignoreFiles": ["**/heti.less"],
"rules": {
"function-no-unknown": null,
"color-function-notation": "legacy"
Expand Down
67 changes: 67 additions & 0 deletions compiled/loader-runner/index.d.ts
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 { }
Loading
Loading