atomsystem 0.1.5 → 0.1.7
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/cli/init.js +35 -0
- package/package.json +4 -3
package/cli/init.js
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
// 사용자에게 질문을 던져서 Next.js와 React를 설치할지 물어봅니다.
|
|
4
|
+
inquirer
|
|
5
|
+
.prompt([
|
|
6
|
+
{
|
|
7
|
+
type: "confirm",
|
|
8
|
+
name: "installPackages",
|
|
9
|
+
message: "Do you want to install Next.js and React?",
|
|
10
|
+
default: true,
|
|
11
|
+
},
|
|
12
|
+
])
|
|
13
|
+
.then((answers) => {
|
|
14
|
+
if (answers.installPackages) {
|
|
15
|
+
console.log("Installing Next.js and React...");
|
|
16
|
+
|
|
17
|
+
// 두 패키지를 동시에 설치하는 명령어
|
|
18
|
+
exec(
|
|
19
|
+
"npm install next@latest react@latest react-dom@latest",
|
|
20
|
+
(err, stdout, stderr) => {
|
|
21
|
+
if (err) {
|
|
22
|
+
console.error(`Error: ${stderr}`);
|
|
23
|
+
} else {
|
|
24
|
+
console.log(stdout);
|
|
25
|
+
console.log("Installation complete!");
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
} else {
|
|
30
|
+
console.log("Installation skipped.");
|
|
31
|
+
}
|
|
32
|
+
})
|
|
33
|
+
.catch((error) => {
|
|
34
|
+
console.error("Error:", error);
|
|
35
|
+
});
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "atomsystem",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
|
-
"atomsystem": "
|
|
6
|
+
"atomsystem-init": "cli/init.js"
|
|
7
7
|
},
|
|
8
8
|
"files": [
|
|
9
|
-
"bin
|
|
9
|
+
"bin",
|
|
10
|
+
"test",
|
|
10
11
|
"token.json",
|
|
11
12
|
"tokens",
|
|
12
13
|
"build",
|