@reactful/create 0.0.103 → 0.0.104

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.
Files changed (2) hide show
  1. package/index.js +10 -2
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -55,16 +55,24 @@ async function prompting(answers) {
55
55
  console.log('- installing dependencies...\n')
56
56
  process.chdir(answers.project)
57
57
  execSync(`bun install`)
58
- spawn("cd", [answers.project])
58
+
59
+ try {
60
+ answers.vscode
61
+ ? spawn("code", ['.'])
62
+ : spawn("cd", [answers.project])
63
+ }
64
+ catch (ex) {
65
+ console.error('prompting', ex)
66
+ }
59
67
  }
60
68
 
61
69
  function renamingJSON(directory, projectName) {
62
70
  const url = `${directory}/package.json`
63
- console.log('renameJSON', url)
64
71
  const txt = fs.readFileSync(url, { encoding: 'utf-8' })
65
72
  const obj = JSON.parse(txt)
66
73
 
67
74
  obj.name = projectName
75
+
68
76
  fs.writeFileSync(url, JSON.stringify(obj, null, 3))
69
77
  }
70
78
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reactful/create",
3
- "version": "0.0.103",
3
+ "version": "0.0.104",
4
4
  "main": "index.js",
5
5
  "type": "module",
6
6
  "description": "reactful scafold tool",