@reactful/create 0.0.60 → 0.0.62

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 +4 -20
  2. package/package.json +2 -4
package/index.js CHANGED
@@ -32,6 +32,9 @@ const questions = [
32
32
  ]
33
33
 
34
34
  inquirer.prompt(questions).then(async function (answers) {
35
+ exec(`md ${answers.project}`)
36
+ exec(`cd ${answers.project}`)
37
+
35
38
  const destination = path.join(process.cwd(), answers.project)
36
39
  const base = 'https://github.com/jsenaribeiro/reactful/installation/'
37
40
 
@@ -41,7 +44,7 @@ inquirer.prompt(questions).then(async function (answers) {
41
44
 
42
45
  console.log('')
43
46
 
44
- exec($`cd ${answers.project} bun install`)
47
+ exec($`bun install`)
45
48
  })
46
49
 
47
50
  function renamingJSON(directory, projectName) {
@@ -54,25 +57,6 @@ function renamingJSON(directory, projectName) {
54
57
  fs.writeFileSync(url, JSON.stringify(obj, null, 3))
55
58
  }
56
59
 
57
- function copyFolder(fromDir, destDir) {
58
- if (!fs.existsSync(fromDir))
59
- return console.error('Directory not found')
60
-
61
- if (!fs.existsSync(destDir))
62
- fs.mkdirSync(destDir)
63
-
64
- const files = fs.readdirSync(fromDir)
65
-
66
- files.forEach(item => {
67
- const fromPath = `${fromDir}/${item}`
68
- const destPath = `${destDir}/${item}`
69
- const isFolder = fs.statSync(fromPath).isDirectory()
70
-
71
- if (isFolder) copyFolder(fromPath, destPath)
72
- else fs.copyFileSync(fromPath, destPath)
73
- })
74
- }
75
-
76
60
  async function downloadRepo(url, destino) {
77
61
  const resposta = await fetch(url)
78
62
  const conteudo = await resposta.json()
package/package.json CHANGED
@@ -1,16 +1,14 @@
1
1
  {
2
2
  "name": "@reactful/create",
3
- "version": "0.0.60",
3
+ "version": "0.0.62",
4
4
  "main": "index.js",
5
5
  "type": "module",
6
6
  "description": "reactful scafold tool",
7
7
  "author": "jonathan de sena ribeiro <jsenaribeiro@gmail.com>",
8
8
  "files": [ "index.js", "package.json" ],
9
9
  "bin": { "@reactful/create": "index.js" },
10
+ "scripts": { "deploy": "npm publish --access public" },
10
11
  "license": "MIT",
11
- "scripts": {
12
- "deploy": "npm publish --access public"
13
- },
14
12
  "dependencies": {
15
13
  "bun-types": "latest",
16
14
  "fs": "^0.0.1-security",