@reactful/create 0.0.67 → 0.0.69
Sign up to get free protection for your applications and to get access to all the features.
- package/index.js +3 -2
- package/package.json +1 -1
package/index.js
CHANGED
@@ -37,7 +37,7 @@ inquirer.prompt(questions).then(async function (answers) {
|
|
37
37
|
|
38
38
|
const destination = path.join(process.cwd(), answers.project)
|
39
39
|
|
40
|
-
await downloadRepo(`
|
40
|
+
await downloadRepo(`commons`, destination)
|
41
41
|
await downloadRepo(`templates/${answers.template}`, destination)
|
42
42
|
|
43
43
|
renamingJSON(destination, answers.project)
|
@@ -61,7 +61,8 @@ const downloadRepo = async (subfolder, destination) =>
|
|
61
61
|
downloadGitHub('jsenaribeiro', 'reactful', subfolder, destination)
|
62
62
|
|
63
63
|
async function downloadGitHub(user, repository, subfolder, destination) {
|
64
|
-
const
|
64
|
+
const prefix = `https://api.github.com/repos/${user}/${repository}`
|
65
|
+
const url = `${prefix}/contents/installation/${subfolder}`
|
65
66
|
const content = await fetch(url).then(x => x.json())
|
66
67
|
|
67
68
|
console.log('- url', url)
|