create-zen 1.6.9 → 1.7.1
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 +8 -41
- package/package.json +3 -3
package/index.js
CHANGED
|
@@ -52,43 +52,11 @@ const getProjectName = async () => {
|
|
|
52
52
|
}
|
|
53
53
|
});
|
|
54
54
|
|
|
55
|
-
console.log();
|
|
56
55
|
return projectName;
|
|
57
56
|
};
|
|
58
57
|
|
|
59
|
-
// Get
|
|
60
|
-
const
|
|
61
|
-
console.log();
|
|
62
|
-
|
|
63
|
-
const { version } = await prompts({
|
|
64
|
-
type: 'select',
|
|
65
|
-
name: 'version',
|
|
66
|
-
message: 'Select ZEN starter version:',
|
|
67
|
-
choices: [
|
|
68
|
-
{
|
|
69
|
-
title: `${chalk.hex(colors.white)('Standard Version')} ${chalk.hex(colors.lightGrey)('(Full-featured with all components)')}`,
|
|
70
|
-
value: 'standard'
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
title: `${chalk.hex(colors.purple)('Lite Version')} ${chalk.hex(colors.lightGrey)('(Essential features only)')}`,
|
|
74
|
-
value: 'lite'
|
|
75
|
-
}
|
|
76
|
-
],
|
|
77
|
-
initial: 0,
|
|
78
|
-
hint: false
|
|
79
|
-
});
|
|
80
|
-
|
|
81
|
-
console.log();
|
|
82
|
-
return version === 'lite';
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
// Get repository URL based on choice
|
|
86
|
-
const getRepositoryUrl = (isLite) => {
|
|
87
|
-
if (isLite) {
|
|
88
|
-
return 'https://github.com/dmitry-conquer/zen-starter-lite.git';
|
|
89
|
-
}
|
|
90
|
-
return 'https://github.com/dmitry-conquer/zen-starter.git';
|
|
91
|
-
};
|
|
58
|
+
// Get repository URL
|
|
59
|
+
const getRepositoryUrl = () => 'https://github.com/dmitry-conquer/zen-starter.git';
|
|
92
60
|
|
|
93
61
|
// Main function with enhanced UX
|
|
94
62
|
const main = async () => {
|
|
@@ -96,21 +64,20 @@ const main = async () => {
|
|
|
96
64
|
displayHeader();
|
|
97
65
|
|
|
98
66
|
const PROJECT_NAME = await getProjectName();
|
|
99
|
-
const
|
|
100
|
-
const REPO_URL = getRepositoryUrl(isLite);
|
|
67
|
+
const REPO_URL = getRepositoryUrl();
|
|
101
68
|
|
|
102
69
|
// Cloning with spinner
|
|
103
70
|
const spinner = ora({
|
|
104
|
-
text: `${chalk.hex(colors.green)('◇')} ${title('
|
|
71
|
+
text: `${chalk.hex(colors.green)('◇')} ${title('Preparing your ZEN project...')}`,
|
|
105
72
|
color: 'green'
|
|
106
73
|
}).start();
|
|
107
74
|
|
|
108
75
|
try {
|
|
109
76
|
execSync(`git clone --depth=1 "${REPO_URL}" "${PROJECT_NAME}"`, { stdio: 'pipe' });
|
|
110
|
-
spinner.
|
|
77
|
+
spinner.stop();
|
|
111
78
|
} catch (err) {
|
|
112
|
-
spinner.fail(`${error('
|
|
113
|
-
console.log(` ${subtitle('Please check your internet connection
|
|
79
|
+
spinner.fail(`${error('Setup failed!')}`);
|
|
80
|
+
console.log(` ${subtitle('Please check your internet connection, permissions, and try again.')}`);
|
|
114
81
|
process.exit(1);
|
|
115
82
|
}
|
|
116
83
|
|
|
@@ -123,7 +90,7 @@ const main = async () => {
|
|
|
123
90
|
console.log();
|
|
124
91
|
|
|
125
92
|
// Next steps
|
|
126
|
-
console.log(` ${chalk.hex(colors.green)('◇')} ${title('Next steps
|
|
93
|
+
console.log(` ${chalk.hex(colors.green)('◇')} ${title('Next steps')}`);
|
|
127
94
|
console.log(` ${chalk.hex(colors.purple)('📁')} ${highlight(`cd ${PROJECT_NAME}`)}`);
|
|
128
95
|
console.log(` ${chalk.hex(colors.purple)('📦')} ${highlight('npm install')}`);
|
|
129
96
|
console.log(` ${chalk.hex(colors.purple)('🧑💻')} ${highlight('npm run dev')}`);
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-zen",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "✨ Create a new web development project with modern setup powered by Vite 🚀",
|
|
6
6
|
"bin": {
|
|
7
|
-
"create-zen": "
|
|
7
|
+
"create-zen": "index.js"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"fs-extra": "^11.1.1",
|
|
@@ -12,4 +12,4 @@
|
|
|
12
12
|
"chalk": "^5.3.0",
|
|
13
13
|
"ora": "^7.0.1"
|
|
14
14
|
}
|
|
15
|
-
}
|
|
15
|
+
}
|