@reactful/create 0.0.89 → 0.0.90

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/index.js +7 -9
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -40,8 +40,11 @@ inquirer.prompt(questions).then(async function (answers) {
40
40
  await downloadRepo(`templates/${answers.template}`, destination)
41
41
 
42
42
  renamingJSON(destination, answers.project)
43
+
44
+ console.log('- installing dependencies...')
43
45
 
44
- execSync(`cd ${answers.project}; bun install`)
46
+ execSync(`cd ${answers.project}`)
47
+ execSync(`bun install`)
45
48
  })
46
49
 
47
50
  function renamingJSON(directory, projectName) {
@@ -60,6 +63,8 @@ const downloadRepo = async (subfolder, destination) =>
60
63
  downloadGitHub('jsenaribeiro', 'reactful', subfolder, destination)
61
64
 
62
65
  async function downloadGitHub(user, repository, subdir, destination) {
66
+ console.log(`- downloading ${subdir}...`)
67
+
63
68
  const prefix = `https://api.github.com/repos/${user}/${repository}`
64
69
  const address = `${prefix}/contents/installation/${subdir}`
65
70
  const response = await fetch(address)
@@ -88,7 +93,7 @@ async function downloadGitHub(user, repository, subdir, destination) {
88
93
  const notFound = fs.existsSync(baseFile) == false
89
94
 
90
95
  if (notFound) fs.mkdirSync(baseFile, { recursive: true })
91
-
96
+
92
97
  fs.writeFileSync(filePath, fileText)
93
98
  }
94
99
  catch(ex) {
@@ -96,13 +101,6 @@ async function downloadGitHub(user, repository, subdir, destination) {
96
101
  logging(response, contents, item.download_url)
97
102
  throw ex
98
103
  }
99
- }
100
-
101
- try {
102
- }
103
- catch(ex) {
104
- console.log('fetching: ', address)
105
- throw ex
106
104
  }
107
105
  }
108
106
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reactful/create",
3
- "version": "0.0.89",
3
+ "version": "0.0.90",
4
4
  "main": "index.js",
5
5
  "type": "module",
6
6
  "description": "reactful scafold tool",