jargons-installer-rw 1.0.0
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 +54 -0
- package/package.json +15 -0
package/index.js
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const inquirer = require("inquirer");
|
|
4
|
+
const { execSync } = require("child_process");
|
|
5
|
+
const chalk = require("chalk");
|
|
6
|
+
|
|
7
|
+
console.log(chalk.blue.bold("\n🚀 Welcome to Jargons Installer\n"));
|
|
8
|
+
|
|
9
|
+
const projects = [
|
|
10
|
+
{
|
|
11
|
+
name: "Hospital Management System",
|
|
12
|
+
value: "hospital",
|
|
13
|
+
repo: "https://github.com/LucasCatty/HOSPITAL_Management-Mern-stack.git",
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
name: "School Payroll System",
|
|
17
|
+
value: "payroll",
|
|
18
|
+
repo: "https://github.com/YOUR_USERNAME/payroll.git",
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
name: "Inventory Management System",
|
|
22
|
+
value: "inventory",
|
|
23
|
+
repo: "https://github.com/YOUR_USERNAME/inventory.git",
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
name: "EPMS",
|
|
27
|
+
value: "epms",
|
|
28
|
+
repo: "https://github.com/LucasCatty/EPMS.git",
|
|
29
|
+
},
|
|
30
|
+
];
|
|
31
|
+
|
|
32
|
+
inquirer
|
|
33
|
+
.prompt([
|
|
34
|
+
{
|
|
35
|
+
type: "list",
|
|
36
|
+
name: "project",
|
|
37
|
+
message: "Select a project to install:",
|
|
38
|
+
choices: projects.map((p) => ({
|
|
39
|
+
name: p.name,
|
|
40
|
+
value: p,
|
|
41
|
+
})),
|
|
42
|
+
},
|
|
43
|
+
])
|
|
44
|
+
.then((answers) => {
|
|
45
|
+
const project = answers.project;
|
|
46
|
+
|
|
47
|
+
console.log(chalk.green(`\n📦 Installing ${project.name}...\n`));
|
|
48
|
+
|
|
49
|
+
execSync(`git clone ${project.repo}`, {
|
|
50
|
+
stdio: "inherit",
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
console.log(chalk.yellow("\n✅ Project installed successfully!\n"));
|
|
54
|
+
});
|
package/package.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "jargons-installer-rw",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "CLI installer for projects",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"bin": {
|
|
7
|
+
"jargons-installer-rw": "index.js"
|
|
8
|
+
},
|
|
9
|
+
"type": "commonjs",
|
|
10
|
+
"dependencies": {
|
|
11
|
+
"chalk": "^4.1.2",
|
|
12
|
+
"inquirer": "^8.2.4",
|
|
13
|
+
"ora": "^5.4.1"
|
|
14
|
+
}
|
|
15
|
+
}
|