@reactful/create 0.0.104 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +13 -12
- package/package.json +27 -25
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,26 +1,28 @@
|
|
1
1
|
{
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
2
|
+
"name": "@reactful/create",
|
3
|
+
"version": "0.1.3",
|
4
|
+
"main": "index.js",
|
5
|
+
"type": "module",
|
6
|
+
"description": "reactful scafold tool",
|
7
|
+
"author": "jonathan de sena ribeiro <jsenaribeiro@gmail.com>",
|
8
|
+
"bin": {
|
9
|
+
"@reactful/create": "index.js"
|
10
|
+
},
|
11
|
+
"files": [
|
12
|
+
"index.js",
|
13
|
+
"package.json",
|
14
|
+
"templates",
|
15
|
+
"commons"
|
16
|
+
],
|
17
|
+
"scripts": {
|
18
|
+
"start": "bun run index.js",
|
19
|
+
"deploy": "npm npm-version patch; npm publish --access public"
|
20
|
+
},
|
21
|
+
"license": "MIT",
|
22
|
+
"dependencies": {
|
23
|
+
"bun-types": "latest",
|
24
|
+
"inquirer": "^9.2.13",
|
25
|
+
"npm-registry-fetch": "^16.1.0",
|
26
|
+
"tar": "^6.2.0"
|
27
|
+
}
|
28
|
+
}
|