@reactful/create 0.1.13 → 0.1.15

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 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 line = '─'.repeat(51)
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(`${decor}( ${GREEN}reactful${RESET}.js )${decor}`)
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 (file) {
130
- const currentPath = path.join(source, file)
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 (fs.lstatSync(currentPath).isDirectory())
134
- copyPath(currentPath, targetPath)
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.13",
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",
@@ -0,0 +1,5 @@
1
+ import React from "react"
2
+
3
+ export default () => <>
4
+ <h2>Empty Template</h2>
5
+ </>
@@ -0,0 +1,5 @@
1
+ import React from "react"
2
+
3
+ export default () => <>
4
+ <h2>Minimal Template</h2>
5
+ </>
@@ -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 = !!global.document;
12662
+ IS_CLIENT_SIDE4 = !!globalThis.document;
12663
12663
  });
12664
12664
 
12665
12665
  // node_modules/@reactful/extensions/npm/types/seo