@@ -15,7 +15,7 @@ export function create(buddy: CLI) {
15
15
components : 'Are you building UI components?' ,
16
16
webComponents : 'Automagically built optimized custom elements/web components?' ,
17
17
vue : 'Automagically built a Vue component library?' ,
18
- pages : 'How about views/ views?' ,
18
+ views : 'How about views?' ,
19
19
functions : 'Are you developing functions/composables?' ,
20
20
api : 'Are you building an API?' ,
21
21
database : 'Do you need a database?' ,
@@ -29,7 +29,7 @@ export function create(buddy: CLI) {
29
29
. option ( '-c, --components' , descriptions . components , { default : true } ) // if no, -v and -w would be false
30
30
. option ( '-w, --web-components' , descriptions . webComponents , { default : true } )
31
31
. option ( '-v, --vue' , descriptions . vue , { default : true } )
32
- . option ( '-p, --views' , descriptions . pages , { default : true } ) // views need an HTTP server
32
+ . option ( '-p, --views' , descriptions . views , { default : true } ) // i.e. `buddy dev`
33
33
. option ( '-f, --functions' , descriptions . functions , { default : true } ) // if no, API would be false
34
34
. option ( '-a, --api' , descriptions . api , { default : true } ) // APIs need an HTTP server & assumes functions is true
35
35
. option ( '-d, --database' , descriptions . database , { default : true } )
@@ -59,8 +59,6 @@ export function create(buddy: CLI) {
59
59
}
60
60
61
61
log . info ( bold ( 'Welcome to the Stacks Framework! ⚛️' ) )
62
- // console.log(`cd ${link(path, `vscode://file/${path}:1`)} && code .`)
63
- // console.log()
64
62
log . info ( 'To learn more, visit https://stacksjs.org' )
65
63
66
64
process . exit ( ExitCode . Success )
@@ -91,16 +89,15 @@ function onlineCheck() {
91
89
92
90
async function download ( name : string , path : string , options : CreateOptions ) {
93
91
log . info ( 'Setting up your stack.' )
94
- const result = await runCommand ( `giget stacks ${ name } ` , options )
92
+ const result = await runCommand ( `bunx giget stacks ${ name } ` , options )
95
93
log . success ( `Successfully scaffolded your project at ${ cyan ( path ) } ` )
96
94
97
95
return result
98
96
}
99
97
100
98
async function ensureEnv ( path : string , options : CreateOptions ) {
101
99
log . info ( 'Ensuring your environment is ready...' )
102
- // todo: this should check for whether the proper Node version is installed because fnm is not a requirement
103
- await runCommand ( 'tea -SE' , { ...options , cwd : path } )
100
+ await runCommand ( 'pkgx --update ' , { ...options , cwd : path } )
104
101
log . success ( 'Environment is ready' )
105
102
}
106
103
@@ -122,8 +119,9 @@ async function install(path: string, options: CreateOptions) {
122
119
123
120
await runAction ( Action . KeyGenerate , { ...options , cwd : path } )
124
121
125
- result = await runCommand ( 'git init' , { ... options , cwd : path } )
122
+ // TODO: we should ask quite a few questions here, similar how we do in `buddy new my-project`, so we can generate a custom pkgx.yaml file
126
123
124
+ result = await runCommand ( 'git init' , { ...options , cwd : path } ) // do we need this? or does giget do this already?
127
125
if ( result . isErr ( ) ) {
128
126
log . error ( result . error )
129
127
process . exit ( ExitCode . FatalError )
0 commit comments