create-laju-app 1.1.2 → 1.1.3

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.
Files changed (2) hide show
  1. package/bin/cli.js +14 -12
  2. package/package.json +1 -1
package/bin/cli.js CHANGED
@@ -165,6 +165,20 @@ program
165
165
  console.log('\x1b[90m Creating project at \x1b[36m' + targetPath + '\x1b[0m');
166
166
  console.log('');
167
167
 
168
+ // Check if Git is installed
169
+ try {
170
+ execSync('git --version', { stdio: 'ignore' });
171
+ } catch (e) {
172
+ console.log('\x1b[1;31m✖\x1b[0m \x1b[1;91mError:\x1b[0m Git is not installed or not in PATH.');
173
+ console.log('');
174
+ console.log('\x1b[90m Please install Git to continue:\x1b[0m');
175
+ console.log(' - Windows: https://git-scm.com/download/win');
176
+ console.log(' - macOS: brew install git');
177
+ console.log(' - Linux: sudo apt install git (Ubuntu/Debian)');
178
+ console.log('');
179
+ process.exit(1);
180
+ }
181
+
168
182
  // Clone template from GitHub
169
183
  const emitter = degit('maulanashalihin/laju');
170
184
 
@@ -177,18 +191,6 @@ program
177
191
  // Update project name in package.json
178
192
  packageJson.name = projectDirectory;
179
193
 
180
- // Update scripts for Windows before writing package.json
181
- if (process.platform === 'win32') {
182
- packageJson.scripts = {
183
- "dev": "cls && if exist dist rmdir /s /q dist && if exist build rmdir /s /q build && npx concurrently \"vite\" \"timeout /t 1 >nul && npx nodemon --config nodemon.json\"",
184
- "build": "if exist build rmdir /s /q build && vite build && tsc && tsc-alias -p tsconfig.json && if not exist dist\\views mkdir dist\\views && xcopy /s /e /i resources\\views dist\\views",
185
- "refresh": "if exist data rmdir /s /q data && npx knex migrate:latest",
186
- "test:ui": "npx vitest --ui",
187
- "test:run": "npx vitest run",
188
- "test:coverage": "npx vitest run --coverage"
189
- };
190
- }
191
-
192
194
  // Write back package.json
193
195
  fs.writeFileSync(
194
196
  packageJsonPath,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-laju-app",
3
- "version": "1.1.2",
3
+ "version": "1.1.3",
4
4
  "description": "CLI tool to scaffold new Laju framework projects",
5
5
  "keywords": [
6
6
  "laju",