@@ -2,11 +2,12 @@ import { Untar } from 'https://deno.land/
[email protected] /archive/tar.ts'
2
2
import { green , dim } from 'https://deno.land/[email protected] /fmt/colors.ts'
3
3
import { ensureDir } from 'https://deno.land/[email protected] /fs/ensure_dir.ts'
4
4
import { join } from 'https://deno.land/[email protected] /path/mod.ts'
5
- import { gunzip } from 'https://deno.land/x/[email protected] /mod.ts'
5
+ import { gunzip } from 'https://deno.land/x/denoflate@1.2. 1/mod.ts'
6
6
import { ensureTextFile } from '../shared/fs.ts'
7
7
import util from '../shared/util.ts'
8
8
import { defaultReactVersion } from '../shared/constants.ts'
9
9
import { VERSION } from '../version.ts'
10
+ import { x_brotli , x_flate } from '../server/compress.ts'
10
11
11
12
export const helpMessage = `
12
13
Usage:
@@ -61,6 +62,7 @@ export default async function (nameArg?: string) {
61
62
imports : {
62
63
'~/' : './' ,
63
64
'aleph/' : `https://deno.land/x/aleph@v${ VERSION } /` ,
65
+ 'aleph/types' : `https://deno.land/x/aleph@v${ VERSION } /types.ts` ,
64
66
'framework' : `https://deno.land/x/aleph@v${ VERSION } /framework/core/mod.ts` ,
65
67
'framework/react' : `https://deno.land/x/aleph@v${ VERSION } /framework/react/mod.ts` ,
66
68
'react' : `https://esm.sh/react@${ defaultReactVersion } ` ,
@@ -73,6 +75,13 @@ export default async function (nameArg?: string) {
73
75
Deno . writeTextFile ( join ( cwd , name , 'import_map.json' ) , JSON . stringify ( importMap , undefined , 2 ) )
74
76
] )
75
77
78
+ const urls = Object . values ( importMap . imports ) . filter ( v => ! v . endsWith ( '/' ) )
79
+ const p = Deno . run ( {
80
+ cmd : [ Deno . execPath ( ) , 'cache' , ...urls , x_brotli , x_flate ]
81
+ } )
82
+ await p . status ( )
83
+ p . close ( )
84
+
76
85
if ( vscode ) {
77
86
const extensions = {
78
87
'recommendations' : [
0 commit comments