@deneb-ui/create-template 2.0.6 → 2.0.7
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/README.md +1 -1
- package/bin/index.js +27 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
> **DENEB UI — Build beautiful interfaces, effortlessly.**
|
|
6
6
|
> The premier visual-first React component ecosystem.
|
|
7
|
-
>
|
|
7
|
+
> Proudly presented by **DENEB-UI Collaborate with FIVORA**.
|
|
8
8
|
|
|
9
9
|
[](https://github.com/chamikathereal)
|
|
10
10
|
[](https://opensource.org/licenses/MIT)
|
package/bin/index.js
CHANGED
|
@@ -7,14 +7,33 @@ const readline = require('node:readline');
|
|
|
7
7
|
const args = process.argv.slice(2);
|
|
8
8
|
let targetDirInput = args[0];
|
|
9
9
|
|
|
10
|
+
function stripAnsi(str) {
|
|
11
|
+
return str.replace(/\x1b\[[0-9;]*m/g, '');
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
function createBox(lines, width = 58) {
|
|
15
|
+
const cyan = '\x1b[36m';
|
|
16
|
+
const reset = '\x1b[0m';
|
|
17
|
+
const top = ` ${cyan}╔${'═'.repeat(width)}╗${reset}`;
|
|
18
|
+
const bottom = ` ${cyan}╚${'═'.repeat(width)}╝${reset}`;
|
|
19
|
+
|
|
20
|
+
const rows = lines.map((line) => {
|
|
21
|
+
const rawLen = stripAnsi(line).length;
|
|
22
|
+
const padTotal = Math.max(0, width - rawLen);
|
|
23
|
+
const padLeft = Math.floor(padTotal / 2);
|
|
24
|
+
const padRight = padTotal - padLeft;
|
|
25
|
+
return ` ${cyan}║${reset}${' '.repeat(padLeft)}${line}${' '.repeat(padRight)}${cyan}║${reset}`;
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
return [top, ...rows, bottom].join('\n');
|
|
29
|
+
}
|
|
30
|
+
|
|
10
31
|
function printBanner() {
|
|
11
|
-
console.log(
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
╚═════════════════════════════════════════════════════════════╝\x1b[0m
|
|
17
|
-
`);
|
|
32
|
+
console.log('\n' + createBox([
|
|
33
|
+
'\x1b[1m\x1b[37mDENEB TEMPLATE CREATOR\x1b[0m',
|
|
34
|
+
'\x1b[90mScaffold a fast, compliant commerce template\x1b[0m',
|
|
35
|
+
'\x1b[90mPowered by DENEB-UI Collaborate with FIVORA\x1b[0m'
|
|
36
|
+
], 58) + '\n');
|
|
18
37
|
}
|
|
19
38
|
|
|
20
39
|
function copyFolderSync(src, dest) {
|
|
@@ -125,7 +144,7 @@ function runScaffolding(targetInput) {
|
|
|
125
144
|
console.log(` \x1b[36m${skipInstall ? '6' : '5'}. npm run zip\x1b[0m`);
|
|
126
145
|
console.log(` Package a clean, upload-ready \x1b[1mfivora-template.zip\x1b[0m.\n`);
|
|
127
146
|
|
|
128
|
-
console.log(`\x1b[
|
|
147
|
+
console.log(`\x1b[90mPowered by DENEB-UI Collaborate with FIVORA\x1b[0m`);
|
|
129
148
|
console.log(`\x1b[1m\x1b[36mHappy building with DENEB UI! 🚀\x1b[0m\n`);
|
|
130
149
|
}
|
|
131
150
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deneb-ui/create-template",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.7",
|
|
4
4
|
"description": "Scaffold a modern, pre-validated DENEB UI storefront template in seconds. Created by Chamika Gayashan & Induranga Kawishwara.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"create-deneb-template": "bin/index.js",
|