@reactful/create 0.0.65 → 0.0.66
Sign up to get free protection for your applications and to get access to all the features.
- package/index.js +5 -3
- package/package.json +1 -1
package/index.js
CHANGED
@@ -62,10 +62,12 @@ const downloadRepo = async (subfolder, destination) =>
|
|
62
62
|
|
63
63
|
async function downloadGitHub(user, repository, subfolder, destination) {
|
64
64
|
const url = `https://api.github.com/repos/${user}/${repository}/contents/${subfolder}`
|
65
|
-
const
|
66
|
-
const conteudo = await resposta.json()
|
65
|
+
const content = await fetch(url).then(x => x.json())
|
67
66
|
|
68
|
-
|
67
|
+
console.log('- url', url)
|
68
|
+
console.log('- res', JSON.stringify(res))
|
69
|
+
|
70
|
+
for (const item of content) {
|
69
71
|
if (item.type != 'file') continue
|
70
72
|
|
71
73
|
const filename = path.join(destination, item.name)
|