@reactful/create 0.0.104 → 0.0.105
Sign up to get free protection for your applications and to get access to all the features.
- package/index.js +13 -12
- package/package.json +2 -2
package/index.js
CHANGED
@@ -18,17 +18,16 @@ console.log(`${decor}( ${GREEN}reactful${RESET}.js )${decor}`)
|
|
18
18
|
console.log(line)
|
19
19
|
|
20
20
|
const templates = ['empty', 'minimal', 'sampling']
|
21
|
-
|
22
21
|
const questions = [{
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
},
|
29
|
-
{ type: 'input', name: 'project', message: 'Project name?', prefix, default: 'Sample' },
|
30
|
-
{ type: 'confirm', name: 'vscode', message: 'VS Code IDE?', prefix },
|
31
|
-
{ type: 'confirm', name: 'install', message: 'Install?', prefix },
|
22
|
+
type: 'list',
|
23
|
+
name: 'template',
|
24
|
+
message: 'Which template?',
|
25
|
+
choices: templates,
|
26
|
+
prefix
|
27
|
+
},
|
28
|
+
{ type: 'input', name: 'project', message: 'Project name?', prefix, default: 'Sample' },
|
29
|
+
{ type: 'confirm', name: 'vscode', message: 'VS Code IDE?', prefix },
|
30
|
+
{ type: 'confirm', name: 'install', message: 'Install?', prefix },
|
32
31
|
]
|
33
32
|
|
34
33
|
inquirer.prompt(questions).then(prompting)
|
@@ -53,7 +52,7 @@ async function prompting(answers) {
|
|
53
52
|
renamingJSON(destination, answers.project)
|
54
53
|
|
55
54
|
console.log('- installing dependencies...\n')
|
56
|
-
process.chdir(answers.project)
|
55
|
+
process.chdir(answers.project)
|
57
56
|
execSync(`bun install`)
|
58
57
|
|
59
58
|
try {
|
@@ -130,9 +129,11 @@ function removeDirectory(directory) {
|
|
130
129
|
}
|
131
130
|
|
132
131
|
function copyFolder(source, target) {
|
132
|
+
const flags = { withFileTypes: true }
|
133
|
+
|
133
134
|
if (!fs.existsSync(target)) fs.mkdirSync(target)
|
134
135
|
|
135
|
-
fs.readdirSync(source).forEach(function (file) {
|
136
|
+
fs.readdirSync(source, flags).forEach(function (file) {
|
136
137
|
const currentPath = path.join(source, file)
|
137
138
|
const targetPath = path.join(target, file)
|
138
139
|
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@reactful/create",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.105",
|
4
4
|
"main": "index.js",
|
5
5
|
"type": "module",
|
6
6
|
"description": "reactful scafold tool",
|
@@ -14,7 +14,7 @@
|
|
14
14
|
],
|
15
15
|
"scripts": {
|
16
16
|
"start": "bun run index.js",
|
17
|
-
"deploy": "npm publish --access public"
|
17
|
+
"deploy": "bunx npm-version minor; npm publish --access public"
|
18
18
|
},
|
19
19
|
"license": "MIT",
|
20
20
|
"dependencies": {
|