create-bingstack-app 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.mjs +12 -0
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -95,6 +95,18 @@ async function main() {
|
|
|
95
95
|
s.stop('Dependencies installed')
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
+
const initGit = await p.confirm({
|
|
99
|
+
message: 'Initialize a git repository?',
|
|
100
|
+
initialValue: true,
|
|
101
|
+
})
|
|
102
|
+
if (p.isCancel(initGit)) return cancel()
|
|
103
|
+
|
|
104
|
+
if (initGit) {
|
|
105
|
+
await execa('git', ['init'], { cwd: targetDir })
|
|
106
|
+
await execa('git', ['add', '-A'], { cwd: targetDir })
|
|
107
|
+
await execa('git', ['commit', '-m', 'Initial commit'], { cwd: targetDir })
|
|
108
|
+
}
|
|
109
|
+
|
|
98
110
|
p.outro(
|
|
99
111
|
`Done! Next steps:\n\n` +
|
|
100
112
|
` cd ${projectName}\n` +
|