Skip to content
This repository was archived by the owner on Jul 6, 2025. It is now read-only.

Commit 8b6ef5a

Browse files
author
Je
committed
doc: add logs for init command
1 parent 66d1af0 commit 8b6ef5a

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

cli/init.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { ensureDir, ensureFile, fromStreamReader, gzipDecode, path, Untar } from '../deps.ts'
1+
import { colors, ensureDir, ensureFile, fromStreamReader, gzipDecode, path, Untar } from '../deps.ts'
2+
import log from '../log.ts'
23
import util from '../util.ts'
34

45
export const helpMessage = `Initiate a new aleph app.
@@ -15,7 +16,9 @@ Options:
1516

1617
export default async function (appDir: string, options: Record<string, string | boolean>) {
1718
const rev = 'master'
19+
log.info('Downloading template...')
1820
const resp = await fetch('https://codeload.github.com/postui/alephjs-templates/tar.gz/' + rev)
21+
log.info('Saving template...')
1922
const gzData = await Deno.readAll(fromStreamReader(resp.body!.getReader()))
2023
const tarData = gzipDecode(gzData)
2124
const entryList = new Untar(new Deno.Buffer(tarData))
@@ -34,5 +37,12 @@ export default async function (appDir: string, options: Record<string, string |
3437
await Deno.copy(entry, file)
3538
}
3639
}
40+
41+
log.info('---')
42+
log.info(`start(dev): ` + colors.bold(`aleph`) + ' dev ' + path.basename(appDir))
43+
log.info(`start(prod): ` + colors.bold(`aleph`) + ' start ' + path.basename(appDir))
44+
log.info(`build(prod): ` + colors.bold(`aleph`) + ' build ' + path.basename(appDir))
45+
log.info('---')
46+
log.info('Done')
3747
Deno.exit(0)
3848
}

0 commit comments

Comments
 (0)