3.0.0 • Published 14 days ago
merak-compile v3.0.0
merak-compile
provide compilation function to plugin and cli
cli
create merak.config.json
{
"dir": ".",
"globals": [],
"fakeGlobalVar": "fakeGlobalVar",
"exclude": ["node_modules/**/*", "dist/**/*"],
"format": "esm",
"logPath": "./name.md"
}
merak
it will parse files to merak-mode and output to outDir
functions
declare const analyseHTML: (code: string) => [number, number][]
declare function resolveHtmlConfig(html: string): {
html: string
config: undefined
}
declare function compileHTML(code: string, baseUrl: string, loc: [number, number][]): string
declare function injectGlobalToIIFE(code: string, globalVar: string, globals: string[], force?: boolean): {
code: string
map: magic_string.SourceMap
warning: {
info: string
loc: SourceLocation
}[]
globals: string[]
}
declare function injectGlobalToESM(code: string, globalVar: string, globals: string[], force?: boolean): {
code: string
map: magic_string.SourceMap
warning: {
info: string
loc: SourceLocation
}[]
globals: string[]
}
ssr
declare function wrap(html: string, url: string): string
declare class SsrTransformer extends Transform {
readonly url: string
templateAttrs: Record<string, string>
private parser
constructor(url: string, templateAttrs: Record<string, string>)
_transform(chunk: any, encoding: string, callback: () => void): void
}
css
declare function merakPostCss(): {
postcssPlugin: string
Root(root: any): void
}
3.0.0
14 days ago
2.1.3
4 months ago
2.1.1
6 months ago
2.0.2
6 months ago
2.1.0
6 months ago
2.0.1
7 months ago
2.0.0
7 months ago
1.0.2
10 months ago
1.0.1
10 months ago
1.0.0
10 months ago
1.0.0-rc.9
12 months ago
1.0.0-rc.8
12 months ago
1.0.4
9 months ago
1.0.3
10 months ago
1.0.0-rc.13
11 months ago
1.0.0-rc.12
12 months ago
1.0.0-rc.11
12 months ago
1.0.0-rc.10
12 months ago
1.0.0-rc.14
10 months ago
1.0.0-rc.7
12 months ago
1.0.0-rc.6
1 year ago
1.0.0-rc.5
1 year ago
1.0.0-rc.4
1 year ago
1.0.0-rc.3
1 year ago
1.0.0-rc.2
1 year ago
1.0.0-rc.1
1 year ago
1.0.0-rc.0
1 year ago