@reactful/create 0.0.104 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/index.js +13 -12
  2. 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
- type: 'list',
24
- name: 'template',
25
- message: 'Which template?',
26
- choices: templates,
27
- prefix
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
- "name": "@reactful/create",
3
- "version": "0.0.104",
4
- "main": "index.js",
5
- "type": "module",
6
- "description": "reactful scafold tool",
7
- "author": "jonathan de sena ribeiro <jsenaribeiro@gmail.com>",
8
- "bin": { "@reactful/create": "index.js" },
9
- "files": [
10
- "index.js",
11
- "package.json",
12
- "templates",
13
- "commons"
14
- ],
15
- "scripts": {
16
- "start": "bun run index.js",
17
- "deploy": "npm publish --access public"
18
- },
19
- "license": "MIT",
20
- "dependencies": {
21
- "tar": "^6.2.0",
22
- "bun-types": "latest",
23
- "inquirer": "^9.2.13",
24
- "npm-registry-fetch": "^16.1.0"
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
+ }