@reactful/create 0.1.13 → 0.1.15
Sign up to get free protection for your applications and to get access to all the features.
package/index.js
CHANGED
@@ -7,15 +7,23 @@ import path from 'path'
|
|
7
7
|
import * as tar from 'tar'
|
8
8
|
import fs from 'fs'
|
9
9
|
|
10
|
+
const CIANO = '\x1b[36m'
|
10
11
|
const GREEN = '\x1b[32m'
|
11
12
|
const RESET = '\x1b[0m'
|
12
13
|
const prefix = `${GREEN}+${RESET}`
|
13
|
-
const
|
14
|
+
const char = '─'
|
15
|
+
const line = char.repeat(51)
|
14
16
|
const decor = '-'.repeat(18)
|
15
17
|
|
18
|
+
|
19
|
+
console.log('___________________________________________________')
|
20
|
+
console.log('')
|
21
|
+
console.log(` ${GREEN}REACTful${RESET} scaffold `)
|
22
|
+
console.log(` ${CIANO}version 1.0${RESET} `)
|
23
|
+
//console.log(`${decor}( ${GREEN}reactful${RESET}.js )${decor}`)
|
24
|
+
console.log('___________________________________________________')
|
16
25
|
// console.log(line)
|
17
|
-
console.log(
|
18
|
-
// console.log(line)
|
26
|
+
console.log('')
|
19
27
|
|
20
28
|
const templates = ['empty', 'minimal', 'sampling']
|
21
29
|
const questions = [{
|
@@ -126,13 +134,13 @@ function removeDirectory(directory) {
|
|
126
134
|
function copyPath(source, target) {
|
127
135
|
if (!fs.existsSync(target)) fs.mkdirSync(target)
|
128
136
|
|
129
|
-
fs.readdirSync(source).forEach(function
|
130
|
-
const
|
137
|
+
fs.readdirSync(source).forEach(function(file) {
|
138
|
+
const sourcePath = path.join(source, file)
|
131
139
|
const targetPath = path.join(target, file)
|
140
|
+
const statusPath = fs.lstatSync(sourcePath)
|
141
|
+
const folderPath = statusPath.isDirectory()
|
132
142
|
|
133
|
-
if (
|
134
|
-
|
135
|
-
|
136
|
-
else fs.copyFileSync(currentPath, targetPath)
|
143
|
+
if (folderPath) copyPath(sourcePath, targetPath)
|
144
|
+
else fs.copyFileSync(sourcePath, targetPath)
|
137
145
|
})
|
138
146
|
}
|
package/package.json
CHANGED
@@ -1,13 +1,11 @@
|
|
1
1
|
{
|
2
2
|
"name": "@reactful/create",
|
3
|
-
"version": "0.1.
|
3
|
+
"version": "0.1.15",
|
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
|
-
"bin": {
|
9
|
-
"@reactful/create": "index.js"
|
10
|
-
},
|
8
|
+
"bin": { "@reactful/create": "index.js" },
|
11
9
|
"files": [
|
12
10
|
"index.js",
|
13
11
|
"package.json",
|
Binary file
|
@@ -12659,7 +12659,7 @@ var init__server = __esm(() => {
|
|
12659
12659
|
var IS_CLIENT_SIDE4;
|
12660
12660
|
var init__route = __esm(() => {
|
12661
12661
|
init_npm2();
|
12662
|
-
IS_CLIENT_SIDE4 = !!
|
12662
|
+
IS_CLIENT_SIDE4 = !!globalThis.document;
|
12663
12663
|
});
|
12664
12664
|
|
12665
12665
|
// node_modules/@reactful/extensions/npm/types/seo
|