create-letswhim 1.1.5 ā 1.1.6
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 +5 -14
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1,32 +1,23 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
3
2
|
import { execSync } from 'child_process';
|
|
4
3
|
import path from 'path';
|
|
5
4
|
import fs from 'fs';
|
|
6
5
|
|
|
7
6
|
const projectName = process.argv[2] || "my-whim-project";
|
|
8
|
-
const repoUrl = "https://github.com/ripkiiii/letswhim-starter.git";
|
|
7
|
+
const repoUrl = "https://github.com/ripkiiii/letswhim-starter.git"; // URL BARU
|
|
9
8
|
|
|
10
9
|
console.log(`\nš Preparing your Lightweight project: ${projectName}...`);
|
|
11
10
|
|
|
12
11
|
try {
|
|
13
|
-
//
|
|
12
|
+
// CLONE TANPA -b starter
|
|
14
13
|
execSync(`git clone ${repoUrl} "${projectName}"`, { stdio: 'ignore' });
|
|
15
14
|
|
|
16
|
-
|
|
17
|
-
const targetPath = path.join(process.cwd(), projectName);
|
|
18
|
-
const gitFolder = path.join(targetPath, '.git');
|
|
19
|
-
|
|
15
|
+
const gitFolder = path.join(process.cwd(), projectName, '.git');
|
|
20
16
|
if (fs.existsSync(gitFolder)) {
|
|
21
17
|
fs.rmSync(gitFolder, { recursive: true, force: true });
|
|
22
18
|
}
|
|
23
19
|
|
|
24
|
-
console.log(`\nā
Project created! Let's start whiming
|
|
25
|
-
console.log(`\nNext steps:`);
|
|
26
|
-
console.log(` cd ${projectName}`);
|
|
27
|
-
console.log(` npm install`);
|
|
28
|
-
console.log(` npm run dev\n`);
|
|
29
|
-
|
|
20
|
+
console.log(`\nā
Project created! Let's start whiming.\n`);
|
|
30
21
|
} catch (error) {
|
|
31
|
-
console.
|
|
22
|
+
console.log(`\nā Bjir, ada error: ${error.message}`);
|
|
32
23
|
}
|