@dhayalesh/create-ktern-docker 1.0.0 → 1.0.2
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/bin/cli.js +9 -4
- package/package.json +15 -15
package/bin/cli.js
CHANGED
|
@@ -49,10 +49,15 @@ async function run() {
|
|
|
49
49
|
validate: (input) => input.length > 0 || 'Project name is required',
|
|
50
50
|
},
|
|
51
51
|
{
|
|
52
|
-
type: '
|
|
53
|
-
name: '
|
|
52
|
+
type: 'list',
|
|
53
|
+
name: 'parentDir',
|
|
54
54
|
message: 'In which directory should the project be created?',
|
|
55
|
-
|
|
55
|
+
choices: [
|
|
56
|
+
{ name: 'apps', value: 'apps' },
|
|
57
|
+
{ name: 'infrastructure', value: 'infrastructure' },
|
|
58
|
+
{ name: 'shared (packages/shared)', value: 'packages/shared' },
|
|
59
|
+
{ name: 'ui (packages/ui)', value: 'packages/ui' },
|
|
60
|
+
],
|
|
56
61
|
},
|
|
57
62
|
{
|
|
58
63
|
type: 'number',
|
|
@@ -63,7 +68,7 @@ async function run() {
|
|
|
63
68
|
];
|
|
64
69
|
|
|
65
70
|
const answers = await inquirer.prompt(questions);
|
|
66
|
-
const targetDir = path.resolve(answers.
|
|
71
|
+
const targetDir = path.resolve(process.cwd(), answers.parentDir, answers.name);
|
|
67
72
|
|
|
68
73
|
if (fs.existsSync(targetDir)) {
|
|
69
74
|
const { overwrite } = await inquirer.prompt([
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@dhayalesh/create-ktern-docker",
|
|
3
|
+
"version": "1.0.2",
|
|
4
|
+
"description": "Standalone KTERN docker generator",
|
|
5
|
+
"bin": {
|
|
6
|
+
"create-ktern-docker": "./bin/cli.js"
|
|
7
|
+
},
|
|
8
|
+
"dependencies": {
|
|
9
|
+
"inquirer": "^8.2.4",
|
|
10
|
+
"ejs": "^3.1.8"
|
|
11
|
+
},
|
|
12
|
+
"publishConfig": {
|
|
13
|
+
"access": "restricted"
|
|
14
|
+
}
|
|
15
|
+
}
|