|
1 |
| -import { |
2 |
| - initWasm, |
3 |
| - SWCOptions, |
4 |
| - TransformOptions, |
5 |
| - transpileSync |
6 |
| -} from '../compiler/mod.ts' |
7 |
| -import type { |
8 |
| - AcceptedPlugin, |
9 |
| - ServerRequest |
10 |
| -} from '../deps.ts' |
11 |
| -import { |
12 |
| - CleanCSS, |
13 |
| - colors, |
14 |
| - ensureDir, |
15 |
| - less, |
16 |
| - marked, |
17 |
| - minify, |
18 |
| - path, |
19 |
| - postcss, |
20 |
| - safeLoadFront, |
21 |
| - Sha1, |
22 |
| - Sha256, |
23 |
| - walk |
24 |
| -} from '../deps.ts' |
| 1 | +import { initWasm, SWCOptions, TransformOptions, transpileSync } from '../compiler/mod.ts' |
| 2 | +import type { AcceptedPlugin, ServerRequest } from '../deps.ts' |
| 3 | +import { CleanCSS, colors, ensureDir, less, marked, minify, path, postcss, safeLoadFront, Sha1, Sha256, walk } from '../deps.ts' |
25 | 4 | import { EventEmitter } from '../framework/core/events.ts'
|
26 |
| -import { |
27 |
| - getPagePath, |
28 |
| - RouteModule, |
29 |
| - Routing |
30 |
| -} from '../framework/core/routing.ts' |
31 |
| -import { |
32 |
| - hashShort, |
33 |
| - reFullVersion, |
34 |
| - reHashJs, |
35 |
| - reHashResolve, |
36 |
| - reHttp, |
37 |
| - reLocaleID, |
38 |
| - reMDExt, |
39 |
| - reModuleExt, |
40 |
| - reStyleModuleExt |
41 |
| -} from '../shared/constants.ts' |
| 5 | +import { getPagePath, RouteModule, Routing } from '../framework/core/routing.ts' |
| 6 | +import { hashShort, reFullVersion, reHashJs, reHashResolve, reHttp, reLocaleID, reMDExt, reModuleExt, reStyleModuleExt } from '../shared/constants.ts' |
42 | 7 | import util from '../shared/util.ts'
|
43 |
| -import type { |
44 |
| - APIHandler, |
45 |
| - Config, |
46 |
| - RouterURL |
47 |
| -} from '../types.ts' |
| 8 | +import type { APIHandler, Config, RouterURL } from '../types.ts' |
48 | 9 | import { VERSION } from '../version.ts'
|
49 | 10 | import { Request } from './api.ts'
|
50 | 11 | import log from './log.ts'
|
51 |
| -import type { |
52 |
| - DependencyDescriptor, |
53 |
| - ImportMap, |
54 |
| - Module |
55 |
| -} from './types.ts' |
56 |
| -import { |
57 |
| - cleanupCompilation, |
58 |
| - colorfulBytesString, |
59 |
| - createHtml, |
60 |
| - ensureTextFile, |
61 |
| - existsDirSync, |
62 |
| - existsFileSync, |
63 |
| - fixImportMap, |
64 |
| - fixImportUrl, |
65 |
| - getAlephPkgUrl, |
66 |
| - getRelativePath, |
67 |
| - newModule |
68 |
| -} from './util.ts' |
69 |
| - |
70 |
| -interface RenderResult { |
71 |
| - url: RouterURL |
72 |
| - status: number |
73 |
| - head: string[] |
74 |
| - scripts: Record<string, any>[] |
75 |
| - body: string |
76 |
| - data: Record<string, string> | null |
77 |
| -} |
| 12 | +import type { DependencyDescriptor, ImportMap, Module, RenderResult } from './types.ts' |
| 13 | +import { cleanupCompilation, colorfulBytesString, createHtml, ensureTextFile, existsDirSync, existsFileSync, fixImportMap, fixImportUrl, getAlephPkgUrl, getRelativePath, newModule } from './util.ts' |
78 | 14 |
|
79 | 15 | /**
|
80 | 16 | * A Project to manage the Aleph.js appliaction.
|
@@ -836,7 +772,7 @@ export class Project {
|
836 | 772 | const output = await less.render(sourceCode || '/* empty content */')
|
837 | 773 | css = output.css
|
838 | 774 | } catch (error) {
|
839 |
| - throw new Error(`less: ${error}`); |
| 775 | + throw new Error(`less: ${error}`) |
840 | 776 | }
|
841 | 777 | }
|
842 | 778 |
|
|
0 commit comments