@reactful/create 0.0.80 → 0.0.82

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 +6 -2
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -62,7 +62,7 @@ const downloadRepo = async (subfolder, destination) =>
62
62
  async function downloadGitHub(user, repository, subdir, destination) {
63
63
  const prefix = `https://api.github.com/repos/${user}/${repository}`
64
64
  const response = await fetch(`${prefix}/contents/installation/${subdir}`)
65
- const contents = response.json()
65
+ const contents = await response.json()
66
66
 
67
67
  if (!Array.isArray(contents) || !response.ok) {
68
68
  console.error('failed to download scafold from github...')
@@ -76,7 +76,11 @@ async function downloadGitHub(user, repository, subdir, destination) {
76
76
  const from = `${subdir}/${item.name}`
77
77
  const goto = `${destination}/${item.name}`
78
78
 
79
- if (item.type === 'dir') await downloadGitHub(from, goto)
79
+ if (item.type === 'dir') {
80
+ await downloadGitHub(from, goto)
81
+ continue
82
+ }
83
+
80
84
  if (item.type != 'file') continue
81
85
 
82
86
  const filename = path.join(destination, item.name)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reactful/create",
3
- "version": "0.0.80",
3
+ "version": "0.0.82",
4
4
  "main": "index.js",
5
5
  "type": "module",
6
6
  "description": "reactful scafold tool",