@npm_akash/rn-package-installer 1.0.2 → 1.0.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.
- package/README.md +1 -9
- package/bin/cli.js +14 -10
- package/package.json +4 -6
package/README.md
CHANGED
|
@@ -20,16 +20,8 @@ No more remembering package names or running multiple install commands — just
|
|
|
20
20
|
|
|
21
21
|
You can use the tool **without installing globally** (recommended):
|
|
22
22
|
|
|
23
|
-
```bash
|
|
24
|
-
|
|
25
|
-
npm i @npm_akash/rn-package-installer
|
|
26
|
-
npx @npm_akash/rn-package-installer
|
|
27
|
-
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
## ▶️ Usage
|
|
31
|
-
|
|
32
23
|
Run the command inside your React or React Native project:
|
|
24
|
+
|
|
33
25
|
```bash
|
|
34
26
|
npx @npm_akash/rn-package-installer
|
|
35
27
|
```
|
package/bin/cli.js
CHANGED
|
@@ -2,24 +2,28 @@ import chalk from "chalk";
|
|
|
2
2
|
import { getUserChoices } from "../src/prompts.js";
|
|
3
3
|
import { installPackages } from "../src/installer.js";
|
|
4
4
|
|
|
5
|
-
// Skip non-interactive / CI
|
|
6
|
-
if (!process.stdout.isTTY || process.env.CI) {
|
|
7
|
-
process.exit(0);
|
|
8
|
-
}
|
|
9
|
-
|
|
10
5
|
console.log(chalk.cyan.bold("\n🚀 RN Package Installer\n"));
|
|
11
6
|
|
|
12
7
|
(async () => {
|
|
13
8
|
try {
|
|
14
9
|
const { selectedPackages, packageManager } =
|
|
15
10
|
await getUserChoices();
|
|
16
|
-
|
|
17
|
-
|
|
11
|
+
|
|
12
|
+
if (!selectedPackages || selectedPackages.length === 0) {
|
|
13
|
+
console.log(chalk.yellow("No packages selected. Exiting."));
|
|
18
14
|
return;
|
|
19
15
|
}
|
|
16
|
+
|
|
20
17
|
await installPackages(selectedPackages, packageManager);
|
|
21
|
-
|
|
18
|
+
|
|
19
|
+
console.log(
|
|
20
|
+
chalk.green.bold("\n✔ Packages installation complete!\n")
|
|
21
|
+
);
|
|
22
22
|
} catch (err) {
|
|
23
|
-
console.error(
|
|
23
|
+
console.error(
|
|
24
|
+
chalk.red("\n❌ Error occurred:\n"),
|
|
25
|
+
err?.message || err
|
|
26
|
+
);
|
|
27
|
+
process.exit(1);
|
|
24
28
|
}
|
|
25
|
-
})();
|
|
29
|
+
})();
|
package/package.json
CHANGED
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@npm_akash/rn-package-installer",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "Interactive package installer for React and React Native",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "bin/cli.js",
|
|
7
7
|
"bin": {
|
|
8
8
|
"rn-package-installer": "bin/cli.js"
|
|
9
9
|
},
|
|
10
|
-
"scripts": {
|
|
11
|
-
"postinstall": "node bin/cli.js"
|
|
12
|
-
},
|
|
10
|
+
"scripts": {},
|
|
13
11
|
"keywords": [
|
|
14
12
|
"react-native",
|
|
15
13
|
"react",
|
|
@@ -27,10 +25,10 @@
|
|
|
27
25
|
},
|
|
28
26
|
"repository": {
|
|
29
27
|
"type": "git",
|
|
30
|
-
"url": "git+https://github.com/Akash562/
|
|
28
|
+
"url": "git+https://github.com/Akash562/package_installer.git"
|
|
31
29
|
},
|
|
32
30
|
"bugs": {
|
|
33
|
-
"url": "https://github.com/Akash562/
|
|
31
|
+
"url": "https://github.com/Akash562/package_installer/issues"
|
|
34
32
|
},
|
|
35
33
|
"author": "Akash",
|
|
36
34
|
"license": "MIT"
|