create-laju-app 1.1.1 → 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.
- package/README.md +19 -19
- package/bin/cli.js +14 -8
- package/package.json +22 -8
package/README.md
CHANGED
|
@@ -59,35 +59,35 @@ Visit `http://localhost:5555`
|
|
|
59
59
|
|
|
60
60
|
## 📚 Documentation
|
|
61
61
|
|
|
62
|
-
**[Complete Documentation →](docs
|
|
62
|
+
**[Complete Documentation →](https://github.com/maulanashalihin/laju/tree/main/docs)**
|
|
63
63
|
|
|
64
64
|
Documentation is organized for progressive learning from beginner to advanced.
|
|
65
65
|
|
|
66
66
|
### Getting Started
|
|
67
|
-
- [Introduction](docs/01-INTRODUCTION.md) - Framework overview, quick start
|
|
68
|
-
- [Project Structure](docs/02-PROJECT-STRUCTURE.md) - Directory layout
|
|
69
|
-
- [Database](docs/03-DATABASE.md) - Knex.js + SQLite
|
|
67
|
+
- [Introduction](https://github.com/maulanashalihin/laju/blob/main/docs/01-INTRODUCTION.md) - Framework overview, quick start
|
|
68
|
+
- [Project Structure](https://github.com/maulanashalihin/laju/blob/main/docs/02-PROJECT-STRUCTURE.md) - Directory layout
|
|
69
|
+
- [Database](https://github.com/maulanashalihin/laju/blob/main/docs/03-DATABASE.md) - Knex.js + SQLite
|
|
70
70
|
|
|
71
71
|
### Core Features
|
|
72
|
-
- [Routing & Controllers](docs/04-ROUTING-CONTROLLERS.md) - Handle requests
|
|
73
|
-
- [Frontend (Svelte 5)](docs/05-FRONTEND-SVELTE.md) - Build reactive UI
|
|
74
|
-
- [Authentication](docs/06-AUTHENTICATION.md) - Sessions + OAuth
|
|
75
|
-
- [Middleware](docs/07-MIDDLEWARE.md) - Auth, rate limiting
|
|
76
|
-
- [Validation](docs/08-VALIDATION.md) - Input validation
|
|
77
|
-
- [Email](docs/09-EMAIL.md) - Send emails
|
|
72
|
+
- [Routing & Controllers](https://github.com/maulanashalihin/laju/blob/main/docs/04-ROUTING-CONTROLLERS.md) - Handle requests
|
|
73
|
+
- [Frontend (Svelte 5)](https://github.com/maulanashalihin/laju/blob/main/docs/05-FRONTEND-SVELTE.md) - Build reactive UI
|
|
74
|
+
- [Authentication](https://github.com/maulanashalihin/laju/blob/main/docs/06-AUTHENTICATION.md) - Sessions + OAuth
|
|
75
|
+
- [Middleware](https://github.com/maulanashalihin/laju/blob/main/docs/07-MIDDLEWARE.md) - Auth, rate limiting
|
|
76
|
+
- [Validation](https://github.com/maulanashalihin/laju/blob/main/docs/08-VALIDATION.md) - Input validation
|
|
77
|
+
- [Email](https://github.com/maulanashalihin/laju/blob/main/docs/09-EMAIL.md) - Send emails
|
|
78
78
|
|
|
79
79
|
### Advanced Features
|
|
80
|
-
- [Storage (S3)](docs/10-STORAGE.md) - File uploads
|
|
81
|
-
- [Caching](docs/11-CACHING.md) - Redis + Database cache
|
|
82
|
-
- [Background Jobs](docs/12-BACKGROUND-JOBS.md) - Cron jobs, Scheduling
|
|
83
|
-
- [CSRF Protection](docs/13-CSRF.md) - Security
|
|
84
|
-
- [Translation](docs/14-TRANSLATION.md) - Multi-language
|
|
80
|
+
- [Storage (S3)](https://github.com/maulanashalihin/laju/blob/main/docs/10-STORAGE.md) - File uploads
|
|
81
|
+
- [Caching](https://github.com/maulanashalihin/laju/blob/main/docs/11-CACHING.md) - Redis + Database cache
|
|
82
|
+
- [Background Jobs](https://github.com/maulanashalihin/laju/blob/main/docs/12-BACKGROUND-JOBS.md) - Cron jobs, Scheduling
|
|
83
|
+
- [CSRF Protection](https://github.com/maulanashalihin/laju/blob/main/docs/13-CSRF.md) - Security
|
|
84
|
+
- [Translation](https://github.com/maulanashalihin/laju/blob/main/docs/14-TRANSLATION.md) - Multi-language
|
|
85
85
|
|
|
86
86
|
### Production
|
|
87
|
-
- [Best Practices](docs/16-BEST-PRACTICES.md) - Code quality
|
|
88
|
-
- [Security Guide](docs/17-SECURITY.md) - Secure your app
|
|
89
|
-
- [Testing](docs/19-TESTING.md) - Unit + Integration tests
|
|
90
|
-
- [Deployment](docs/20-DEPLOYMENT.md) - Production setup
|
|
87
|
+
- [Best Practices](https://github.com/maulanashalihin/laju/blob/main/docs/16-BEST-PRACTICES.md) - Code quality
|
|
88
|
+
- [Security Guide](https://github.com/maulanashalihin/laju/blob/main/docs/17-SECURITY.md) - Secure your app
|
|
89
|
+
- [Testing](https://github.com/maulanashalihin/laju/blob/main/docs/19-TESTING.md) - Unit + Integration tests
|
|
90
|
+
- [Deployment](https://github.com/maulanashalihin/laju/blob/main/docs/20-DEPLOYMENT.md) - Production setup
|
|
91
91
|
|
|
92
92
|
## Project Structure
|
|
93
93
|
|
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,14 +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 && npx concurrently \"vite\" \"npx nodemon\"",
|
|
184
|
-
"build": "if exist build rmdir /s /q build && vite build && tsc && xcopy /s /e /i dist build && xcopy /s /e /i public build"
|
|
185
|
-
};
|
|
186
|
-
}
|
|
187
|
-
|
|
188
194
|
// Write back package.json
|
|
189
195
|
fs.writeFileSync(
|
|
190
196
|
packageJsonPath,
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-laju-app",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.3",
|
|
4
|
+
"description": "CLI tool to scaffold new Laju framework projects",
|
|
4
5
|
"keywords": [
|
|
5
6
|
"laju",
|
|
6
7
|
"svelte",
|
|
@@ -9,20 +10,33 @@
|
|
|
9
10
|
"sqlite",
|
|
10
11
|
"boilerplate",
|
|
11
12
|
"template",
|
|
12
|
-
"generator"
|
|
13
|
+
"generator",
|
|
14
|
+
"cli"
|
|
13
15
|
],
|
|
16
|
+
"author": "Maulana Shalihin <maulana@drip.id>",
|
|
17
|
+
"license": "MIT",
|
|
18
|
+
"homepage": "https://laju.dev",
|
|
19
|
+
"repository": {
|
|
20
|
+
"type": "git",
|
|
21
|
+
"url": "git+https://github.com/arghoritma/create-laju-app.git"
|
|
22
|
+
},
|
|
23
|
+
"bugs": {
|
|
24
|
+
"url": "https://github.com/maulanashalihin/laju/issues"
|
|
25
|
+
},
|
|
26
|
+
"engines": {
|
|
27
|
+
"node": ">=20.0.0"
|
|
28
|
+
},
|
|
14
29
|
"bin": {
|
|
15
30
|
"create-laju-app": "./bin/cli.js"
|
|
16
31
|
},
|
|
32
|
+
"files": [
|
|
33
|
+
"bin",
|
|
34
|
+
"README.md",
|
|
35
|
+
"LICENSE"
|
|
36
|
+
],
|
|
17
37
|
"dependencies": {
|
|
18
|
-
"child_process": "^1.0.2",
|
|
19
38
|
"commander": "^11.0.0",
|
|
20
39
|
"degit": "^2.8.4",
|
|
21
40
|
"prompts": "^2.4.2"
|
|
22
|
-
},
|
|
23
|
-
"homepage": "https://laju.dev",
|
|
24
|
-
"repository": {
|
|
25
|
-
"type": "git",
|
|
26
|
-
"url": "git+https://github.com/maulanashalihin/laju.git"
|
|
27
41
|
}
|
|
28
42
|
}
|