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

Commit 070b804

Browse files
committed
Allow to create vercel.json in init command
1 parent 01c5703 commit 070b804

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

commands/init.ts

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,13 +135,26 @@ export default async function (
135135
])
136136
}
137137

138+
if (vercel) {
139+
Deno.writeTextFile(
140+
join(name, 'vercel.json'),
141+
JSON.stringify({
142+
functions: {
143+
'api/**/*.{j,t}s': {
144+
runtime: '[email protected]'
145+
}
146+
}
147+
}, undefined, 2),
148+
)
149+
}
150+
138151
// cache deps in import maps
139152
console.log('Cache deps...')
140153
const urls = Object.values(importMap.imports).filter((v) => !v.endsWith('/'))
141154
const p = Deno.run({
142155
cmd: [Deno.execPath(), 'cache', ...urls, deno_x_brotli, deno_x_flate],
143-
stderr: 'null',
144-
stdout: 'null',
156+
stderr: 'inherit',
157+
stdout: 'inherit',
145158
})
146159
await p.status()
147160
p.close()
@@ -155,7 +168,8 @@ ${dim('▲')} aleph start ${dim('# start the app in `production` mode')}
155168
${dim('▲')} aleph build ${dim('# build the app to a static site (SSG)')}
156169
157170
Docs: ${cyan('https://alephjs.org/docs')}
158-
Bugs: ${cyan('https://alephjs.org.com/alephjs/aleph.js/issues')}`
171+
Bugs: ${cyan('https://alephjs.org.com/alephjs/aleph.js/issues')}
172+
`
159173
)
160174

161175
Deno.exit(0)

0 commit comments

Comments
 (0)