@fullstackunicorn/create-root 1.0.13 → 1.0.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.cmd.js +6 -6
- package/index.def.js +3 -15
- package/modules/init.js +19 -16
- package/package.json +6 -6
- package/assets/package.json +0 -10
- package/assets/root.config.app.js +0 -74
- package/assets/root.config.cmd.sh +0 -48
- package/assets/root.readme.md +0 -3
package/index.cmd.js
CHANGED
|
@@ -9,11 +9,11 @@ const [nodePath, nodeScriptPath, foldername] = process.argv
|
|
|
9
9
|
try {
|
|
10
10
|
|
|
11
11
|
if (!F3.str.isGood(foldername)) {
|
|
12
|
-
console.error('Error: missing foldername')
|
|
13
|
-
console.error('
|
|
14
|
-
console.error('yarn create @fullstackunicorn/root foldername')
|
|
15
|
-
console.error('npm create @fullstackunicorn/root foldername')
|
|
16
|
-
console.error('npx @fullstackunicorn/create-root foldername')
|
|
12
|
+
console.error('❌ Error: missing foldername')
|
|
13
|
+
console.error('✅ Suggestion:')
|
|
14
|
+
console.error('👉 yarn create @fullstackunicorn/root foldername')
|
|
15
|
+
console.error('👉 npm create @fullstackunicorn/root foldername')
|
|
16
|
+
console.error('👉 npx @fullstackunicorn/create-root foldername')
|
|
17
17
|
process.exit(1)
|
|
18
18
|
}
|
|
19
19
|
|
|
@@ -21,6 +21,6 @@ try {
|
|
|
21
21
|
process.exit(0)
|
|
22
22
|
|
|
23
23
|
} catch (err) {
|
|
24
|
-
console.error('Error:', err)
|
|
24
|
+
console.error('❌ Error:', err)
|
|
25
25
|
process.exit(1)
|
|
26
26
|
}
|
package/index.def.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { basePath } from '#@/index.dep.js'
|
|
1
|
+
import { basePath, path } from '#@/index.dep.js'
|
|
2
2
|
|
|
3
3
|
export class Def {
|
|
4
4
|
|
|
@@ -7,20 +7,8 @@ export class Def {
|
|
|
7
7
|
this.cwd = process.cwd()
|
|
8
8
|
|
|
9
9
|
this.folders = {}
|
|
10
|
+
this.folders.assets = path.join(basePath, 'assets')
|
|
11
|
+
this.folders.source = path.join(this.folders.assets, 'root.fullstackunicorn.dev')
|
|
10
12
|
this.folders.target = this.cwd
|
|
11
|
-
this.folders.assets = `${basePath}/assets`
|
|
12
|
-
|
|
13
|
-
this.urls = {}
|
|
14
|
-
this.urls.basePath = 'https://api.websites.minderable.com'
|
|
15
|
-
this.urls.generate = `${this.urls.basePath}/root/generate`
|
|
16
|
-
|
|
17
|
-
this.lists = {}
|
|
18
|
-
this.lists.create = [
|
|
19
|
-
'package.json',
|
|
20
|
-
'root.config.app.js',
|
|
21
|
-
'root.config.cmd.sh',
|
|
22
|
-
'root.readme.md',
|
|
23
|
-
]
|
|
24
|
-
|
|
25
13
|
}
|
|
26
14
|
}
|
package/modules/init.js
CHANGED
|
@@ -4,26 +4,29 @@ import { Def } from '#@/index.def.js'
|
|
|
4
4
|
class Init {
|
|
5
5
|
|
|
6
6
|
constructor () {
|
|
7
|
-
this.def = new Def
|
|
7
|
+
this.def = new Def()
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
async run(foldername) {
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
12
|
+
try {
|
|
13
|
+
|
|
14
|
+
const { source } = this.def.folders
|
|
15
|
+
if (foldername) this.def.folders.target = path.resolve(this.def.cwd, foldername)
|
|
16
|
+
if (!await fsa.exists(source)) F3.throw('missing-source-folder', { source })
|
|
17
|
+
await fsa.ensureDir(this.def.folders.target)
|
|
18
|
+
await fsa.copyDirSafe(source, this.def.folders.target)
|
|
19
|
+
F3.logs('✅ root-created')
|
|
20
|
+
F3.logs('👉 now run:')
|
|
21
|
+
F3.logs(`cd ${this.def.folders.target} && yarn initialize:all`)
|
|
22
|
+
F3.logs(`yarn start:all`)
|
|
23
|
+
F3.logs(`cd ${this.def.folders.target}/assets`)
|
|
24
|
+
F3.logs(`yarn cmd website develop-config`)
|
|
25
|
+
F3.logs(`yarn cmd website develop-assets`)
|
|
26
|
+
F3.logs(`yarn cmd website develop-workers`)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
} catch (e) { F3.catch.throw(e) }
|
|
27
30
|
}
|
|
28
31
|
}
|
|
29
32
|
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.0.
|
|
2
|
+
"version": "1.0.15",
|
|
3
3
|
"name": "@fullstackunicorn/create-root",
|
|
4
4
|
"author": "lucanigido (https://fullstackunicorn.dev/author/lucanigido)",
|
|
5
5
|
"description": "create-root: bootstrapper that writes config assets and installs @fullstackunicorn/root",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"private": false,
|
|
9
|
-
"readme": "package.
|
|
9
|
+
"readme": "package.md",
|
|
10
10
|
"files": [
|
|
11
11
|
"index.cmd.js",
|
|
12
12
|
"index.def.js",
|
|
@@ -31,11 +31,11 @@
|
|
|
31
31
|
"test": "exit 1"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@fullstackunicorn/filesystem": "^1.0.
|
|
35
|
-
"@fullstackunicorn/initialize": "^1.0.
|
|
34
|
+
"@fullstackunicorn/filesystem": "^1.0.12",
|
|
35
|
+
"@fullstackunicorn/initialize": "^1.0.13"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@fullstackunicorn/cli": "^1.0.
|
|
39
|
-
"@fullstackunicorn/reduce": "^1.0.
|
|
38
|
+
"@fullstackunicorn/cli": "^1.0.8",
|
|
39
|
+
"@fullstackunicorn/reduce": "^1.0.22"
|
|
40
40
|
}
|
|
41
41
|
}
|
package/assets/package.json
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
const app = {}
|
|
2
|
-
|
|
3
|
-
// dev
|
|
4
|
-
app.dev = {}
|
|
5
|
-
app.dev.port = 9000
|
|
6
|
-
app.dev.token = 'd5ca3630-46f9-4f27-9d19-a7a6186a0f7d'
|
|
7
|
-
app.dev.user = 'xxxxxxxx-xxxx-4xxx-8xxx-xxxxxxxxxxxx'
|
|
8
|
-
|
|
9
|
-
// domain
|
|
10
|
-
app.domain = {}
|
|
11
|
-
app.domain.name = 'root.fullstackunicorn.dev'
|
|
12
|
-
|
|
13
|
-
// package
|
|
14
|
-
app.package = {}
|
|
15
|
-
app.package.author = 'lucanigido (https://fullstackunicorn.dev/author/lucanigido)'
|
|
16
|
-
|
|
17
|
-
// languages
|
|
18
|
-
app.languages = {}
|
|
19
|
-
app.languages['@lang'] = 'en-US'
|
|
20
|
-
app.languages['@langs'] = []
|
|
21
|
-
|
|
22
|
-
// devops
|
|
23
|
-
app.devops = {}
|
|
24
|
-
// devops.git
|
|
25
|
-
app.devops.git = {}
|
|
26
|
-
app.devops.git.name = 'name'
|
|
27
|
-
app.devops.git.email = 'name@email.com'
|
|
28
|
-
app.devops.git.namespace = 'fullstackunicorn'
|
|
29
|
-
app.devops.git.project = 'root.fullstackunicorn.dev'
|
|
30
|
-
// devops.gitlab
|
|
31
|
-
app.devops.gitlab = {}
|
|
32
|
-
|
|
33
|
-
// index
|
|
34
|
-
app.index = {}
|
|
35
|
-
app.index.author_name = "lucanigido"
|
|
36
|
-
app.index.author_link = "https://fullstackunicorn.dev/author/lucanigido"
|
|
37
|
-
app.index.name = "Root"
|
|
38
|
-
app.index.short_name = "Root"
|
|
39
|
-
app.index.theme_color = "#ffffff"
|
|
40
|
-
app.index.background_color = "#ffffff"
|
|
41
|
-
|
|
42
|
-
// configure
|
|
43
|
-
app.configure = {}
|
|
44
|
-
// logo → svg or png
|
|
45
|
-
app.configure = {}
|
|
46
|
-
app.configure.logo = {}
|
|
47
|
-
app.configure.logo.XY = 32
|
|
48
|
-
app.configure.logo.ext = 'png'
|
|
49
|
-
// trademark → svg or png
|
|
50
|
-
app.configure.trademark = {}
|
|
51
|
-
app.configure.trademark.Xmax = 260
|
|
52
|
-
app.configure.trademark.Y = 18
|
|
53
|
-
app.configure.trademark.ext = 'png'
|
|
54
|
-
// layout
|
|
55
|
-
app.configure.layout = {}
|
|
56
|
-
app.configure.layout.IS_SIDEBAR_ONE_INTERNAL_OFF = false
|
|
57
|
-
app.configure.layout.IS_SIDEBAR_ONE_EXTERNAL_OFF = false
|
|
58
|
-
app.configure.layout.IS_SIDEBAR_TWO_INTERNAL_OFF = false
|
|
59
|
-
app.configure.layout.IS_SIDEBAR_TWO_EXTERNAL_OFF = false
|
|
60
|
-
app.configure.layout.column_1 = 976
|
|
61
|
-
app.configure.layout.column_2 = 1304
|
|
62
|
-
app.configure.layout.column_3 = 1616
|
|
63
|
-
// services
|
|
64
|
-
app.configure.services = {}
|
|
65
|
-
app.configure.services.IS_DEFAULT_THEME_DARK = false
|
|
66
|
-
app.configure.services.IS_BUTTON_USER_OFF = true
|
|
67
|
-
app.configure.services.IS_CARD_ACCOUNT_OFF = true
|
|
68
|
-
app.configure.services.IS_CARD_LANGUAGE_OFF = true
|
|
69
|
-
app.configure.services.IS_CARD_THEME_OFF = true
|
|
70
|
-
app.configure.services.IS_CARD_COOKIES_OFF = true
|
|
71
|
-
app.configure.services.IS_CARD_LEGALS_OFF = true
|
|
72
|
-
app.configure.services.IS_BAND_CALLOUT_ON = false
|
|
73
|
-
|
|
74
|
-
export { app }
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
set -e
|
|
3
|
-
# ============================================================
|
|
4
|
-
add() {
|
|
5
|
-
|
|
6
|
-
# echo "🚀 Adding Dependencies"
|
|
7
|
-
|
|
8
|
-
# yarn add npm-name --latest
|
|
9
|
-
|
|
10
|
-
echo "🚀 Adding Dev Dependencies"
|
|
11
|
-
|
|
12
|
-
yarn add -D @fullstackunicorn/root --latest
|
|
13
|
-
yarn add -D @fullstackunicorn/reduce --latest
|
|
14
|
-
yarn add -D @fullstackunicorn/cli --latest
|
|
15
|
-
|
|
16
|
-
echo "✅ Dependencies added!"
|
|
17
|
-
}
|
|
18
|
-
# ============================================================
|
|
19
|
-
upgrade() {
|
|
20
|
-
|
|
21
|
-
# echo "🚀 Upgrading Dependency "
|
|
22
|
-
|
|
23
|
-
# yarn upgrade @fullstackunicorn/root --latest
|
|
24
|
-
# yarn upgrade @fullstackunicorn/reduce --latest
|
|
25
|
-
# yarn upgrade @fullstackunicorn/cli --latest
|
|
26
|
-
|
|
27
|
-
echo "🚀 Upgrading Dependencies "
|
|
28
|
-
|
|
29
|
-
yarn upgrade --latest
|
|
30
|
-
|
|
31
|
-
echo "✅ Upgaded!"
|
|
32
|
-
}
|
|
33
|
-
# ============================================================
|
|
34
|
-
info() {
|
|
35
|
-
echo "❌ Unknown command: $1"
|
|
36
|
-
echo "Available commands:"
|
|
37
|
-
declare -F | awk '{print " " $3}' | grep -v "^info$"
|
|
38
|
-
exit 1
|
|
39
|
-
}
|
|
40
|
-
# ============================================================
|
|
41
|
-
cmd="${1:-}"
|
|
42
|
-
shift || true
|
|
43
|
-
if declare -F "$cmd" >/dev/null && [[ "$cmd" != "info" ]]; then
|
|
44
|
-
"$cmd" "$@"
|
|
45
|
-
else
|
|
46
|
-
info "$cmd"
|
|
47
|
-
fi
|
|
48
|
-
# ============================================================
|
package/assets/root.readme.md
DELETED