create-letswhim 1.0.0 β†’ 1.1.4

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/index.js +32 -13
  2. package/package.json +16 -8
package/index.js CHANGED
@@ -4,31 +4,50 @@ const { execSync } = require('child_process');
4
4
  const path = require('path');
5
5
  const fs = require('fs');
6
6
 
7
- // Ambil nama folder dari input user, kalau gak ada kasih default
7
+ // Warna Terminal Minimalis
8
+ const pc = {
9
+ blue: (s) => `\x1b[34m${s}\x1b[0m`,
10
+ green: (s) => `\x1b[32m${s}\x1b[0m`,
11
+ dim: (s) => `\x1b[2m${s}\x1b[0m`,
12
+ bold: (s) => `\x1b[1m${s}\x1b[0m`,
13
+ cyan: (s) => `\x1b[36m${s}\x1b[0m`
14
+ };
15
+
8
16
  const projectName = process.argv[2] || 'my-whim-project';
9
17
  const targetPath = path.join(process.cwd(), projectName);
10
18
 
11
- console.log(`\nπŸš€ Preparing your Lightweight project: ${projectName}...\n`);
19
+ console.log(`\n${pc.bold('LETSWHIM')} ${pc.dim('v1.1.0')}`);
20
+ console.log(`${pc.blue('β€œLet’s just start.”')}\n`);
12
21
 
13
22
  try {
14
- // 1. Clone dari branch STARTER yang sudah kita bantai mobile responsive-nya
15
- console.log('πŸ“¦ Fetching letswhim-official starter template...');
16
- execSync(`git clone -b starter https://github.com/guug-labs/letswhim-official.git "${projectName}"`, { stdio: 'inherit' });
23
+ // 1. Cek jika folder sudah ada
24
+ if (fs.existsSync(targetPath)) {
25
+ console.error(`\x1b[31m❌ Error:\x1b[0m Folder ${projectName} sudah ada.`);
26
+ process.exit(1);
27
+ }
28
+
29
+ // 2. Clone dari REPO STARTER BARU (Public)
30
+ console.log(`${pc.dim('πŸ“¦ Fetching the minimalist engine...')}`);
31
+
32
+ // Ganti URL ini dengan URL Repo Starter Public lo yang baru
33
+ const repoUrl = "https://github.com/ripkiiii/letswhim-starter.git";
34
+
35
+ execSync(`git clone ${repoUrl} "${projectName}"`, { stdio: 'ignore' });
17
36
 
18
- // 2. Hapus folder .git biar project user gak nyambung ke repo lo
19
- console.log('\n🧹 Cleaning up metadata...');
37
+ // 3. Hapus metadata Git agar menjadi project baru milik user
20
38
  const gitDir = path.join(targetPath, '.git');
21
39
  if (fs.existsSync(gitDir)) {
22
40
  fs.rmSync(gitDir, { recursive: true, force: true });
23
41
  }
24
42
 
25
- console.log('\nβœ… Letswhim is ready for action!');
26
- console.log(`\nNext steps:`);
27
- console.log(` 1. cd ${projectName}`);
28
- console.log(` 2. npm install`);
29
- console.log(` 3. npm run dev\n`);
43
+ // 4. Instruksi Selesai
44
+ console.log(`\n${pc.green('✨ Project created successfully!')}`);
45
+ console.log(`\n${pc.bold('Next steps:')}`);
46
+ console.log(` ${pc.cyan(`cd ${projectName}`)}`);
47
+ console.log(` ${pc.cyan('npm install')}`);
48
+ console.log(` ${pc.cyan('npm run dev')}\n`);
30
49
 
31
50
  } catch (error) {
32
- console.error('\n❌ Bjir, ada error:', error.message);
51
+ console.error(`\x1b[31m❌ Error:\x1b[0m Gagal membuat project.`, error.message);
33
52
  process.exit(1);
34
53
  }
package/package.json CHANGED
@@ -1,15 +1,23 @@
1
1
  {
2
2
  "name": "create-letswhim",
3
- "version": "1.0.0",
4
- "description": "The official starter for Letswhim Framework",
3
+ "version": "1.1.4",
4
+ "description": "The official human-readable starter for LetsWhim Framework.",
5
+ "type": "module",
5
6
  "main": "index.js",
6
7
  "bin": {
7
8
  "create-letswhim": "index.js"
8
9
  },
9
- "scripts": {
10
- "test": "echo \"Error: no test specified\" && exit 1"
11
- },
12
- "keywords": ["letswhim", "astro", "starter"],
13
- "author": "GUUG Labs",
14
- "license": "MIT"
10
+ "keywords": [
11
+ "letswhim",
12
+ "ssg",
13
+ "terminal-ui",
14
+ "minimalist-framework",
15
+ "human-readable"
16
+ ],
17
+ "author": "Rifky",
18
+ "license": "MIT",
19
+ "dependencies": {
20
+ "picocolors": "^1.0.0",
21
+ "prompts": "^2.4.2"
22
+ }
15
23
  }