@reactful/create 0.1.5 → 0.1.6
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
@@ -50,6 +50,10 @@ async function prompting(answers) {
|
|
50
50
|
await copyTemplate(temporaryPath, `templates/${answers.template}`, destination)
|
51
51
|
await removeDirectory(temporaryPath)
|
52
52
|
|
53
|
+
console.log('- creating .env...')
|
54
|
+
const env = `PORT=333\nMINIFY=FALSE`
|
55
|
+
fs.writeFileSync(`${destination}/.env`, env)
|
56
|
+
|
53
57
|
console.log('- templating project...')
|
54
58
|
renamingJSON(destination, answers.project)
|
55
59
|
|
@@ -131,11 +135,9 @@ function removeDirectory(directory) {
|
|
131
135
|
}
|
132
136
|
|
133
137
|
function copyFolder(source, target) {
|
134
|
-
const flags = { withFileTypes: true }
|
135
|
-
|
136
138
|
if (!fs.existsSync(target)) fs.mkdirSync(target)
|
137
139
|
|
138
|
-
fs.readdirSync(source
|
140
|
+
fs.readdirSync(source).forEach(function (file) {
|
139
141
|
const currentPath = path.join(source, file)
|
140
142
|
const targetPath = path.join(target, file)
|
141
143
|
|