Skip to content

Commit b0e6c2c

Browse files
fix: 🐛 installing new application
1 parent bec4cc7 commit b0e6c2c

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@smoothjs/cli",
3-
"version": "0.1.4",
3+
"version": "0.1.5",
44
"description": "CLI tool for SmoothJS.",
55
"main": "./build/index.js",
66
"types": "./build/index.d.ts",

src/command-service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export class CommandService {
1111
}
1212

1313
public async create() {
14-
this.commander.version('0.1.0')
14+
this.commander.version('0.1.5', '-v, --version', 'Output the current CLI version')
1515

1616
this.commands.forEach((command: object) => {
1717
this.registerCommand(command)

src/commands/application.command.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export class ApplicationCommand {
1717
name: 'branch',
1818
flag: '-b, --branch <branch>',
1919
description: 'Clone a specific branch.',
20-
defaultValue: undefined,
20+
defaultValue: 'master',
2121
required: false,
2222
})
2323
branch: string | undefined,
@@ -26,7 +26,7 @@ export class ApplicationCommand {
2626
name: 'blueprint',
2727
flag: '-r, --blueprint <blueprint>',
2828
description: 'A specific github url.',
29-
defaultValue: 'smooth-app',
29+
defaultValue: 'smoothjs/smooth-app',
3030
required: false,
3131
})
3232
blueprint: string | undefined,
@@ -54,8 +54,6 @@ export class ApplicationCommand {
5454
return
5555
}
5656

57-
fs.ensureDir(names.kebabName).cd(names.kebabName)
58-
5957
log('📂 Creating files...')
6058

6159
let cloneCommand = 'git clone --depth=1'
@@ -77,6 +75,8 @@ export class ApplicationCommand {
7775
return
7876
}
7977

78+
fs.cd(names.kebabName)
79+
8080
if (autoInstall) {
8181
const packageManager = isYarnInstalled() ? 'yarn' : 'npm'
8282

@@ -117,6 +117,6 @@ export class ApplicationCommand {
117117
if (!autoInstall) {
118118
logCommand('npm install')
119119
}
120-
logCommand('npm run develop')
120+
logCommand('npm run build')
121121
}
122122
}

0 commit comments

Comments
 (0)