create-adonisjs 1.2.2-0 → 1.2.2-1
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 +5 -3
- package/build/commands/main.d.ts +2 -2
- package/build/commands/main.js +16 -10
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -82,9 +82,11 @@ npm init adonisjs -- --pkg="yarn"
|
|
|
82
82
|
### Other options
|
|
83
83
|
|
|
84
84
|
| Option | Description |
|
|
85
|
-
|
|
86
|
-
| `--
|
|
87
|
-
| `--
|
|
85
|
+
|-------------------|-----------------------------------|
|
|
86
|
+
| `--install` | Install dependencies. |
|
|
87
|
+
| `--git-init` | Initialize git repository. |
|
|
88
|
+
| `--no-install` | Don't install dependencies. |
|
|
89
|
+
| `--no-git-init` | Don't initialize git repository. |
|
|
88
90
|
|
|
89
91
|
## Contributing
|
|
90
92
|
|
package/build/commands/main.d.ts
CHANGED
|
@@ -23,11 +23,11 @@ export declare class CreateNewApp extends BaseCommand {
|
|
|
23
23
|
/**
|
|
24
24
|
* Skip packages installation
|
|
25
25
|
*/
|
|
26
|
-
|
|
26
|
+
install?: boolean;
|
|
27
27
|
/**
|
|
28
28
|
* Skip git initialization
|
|
29
29
|
*/
|
|
30
|
-
|
|
30
|
+
gitInit?: boolean;
|
|
31
31
|
/**
|
|
32
32
|
* Package manager to use
|
|
33
33
|
*/
|
package/build/commands/main.js
CHANGED
|
@@ -73,10 +73,15 @@ export class CreateNewApp extends BaseCommand {
|
|
|
73
73
|
* Install dependencies with the detected package manager
|
|
74
74
|
*/
|
|
75
75
|
async #installDependencies() {
|
|
76
|
-
if (this.
|
|
76
|
+
if (this.install === false) {
|
|
77
77
|
return;
|
|
78
78
|
}
|
|
79
|
-
this.#shouldInstallDependencies =
|
|
79
|
+
this.#shouldInstallDependencies =
|
|
80
|
+
this.install ||
|
|
81
|
+
(await this.prompt.confirm('Do you want to install dependencies?', {
|
|
82
|
+
hint: this.packageManager + ' will be used',
|
|
83
|
+
default: true,
|
|
84
|
+
}));
|
|
80
85
|
if (!this.#shouldInstallDependencies) {
|
|
81
86
|
return;
|
|
82
87
|
}
|
|
@@ -97,12 +102,13 @@ export class CreateNewApp extends BaseCommand {
|
|
|
97
102
|
* Init git repository inside the destination directory
|
|
98
103
|
*/
|
|
99
104
|
async #initGitRepo() {
|
|
100
|
-
if (this.
|
|
105
|
+
if (this.gitInit === false) {
|
|
101
106
|
return;
|
|
102
107
|
}
|
|
103
|
-
const shouldInit =
|
|
104
|
-
|
|
105
|
-
|
|
108
|
+
const shouldInit = this.gitInit ||
|
|
109
|
+
(await this.prompt.confirm('Do you want to initialize a git repository?', {
|
|
110
|
+
default: true,
|
|
111
|
+
}));
|
|
106
112
|
if (!shouldInit) {
|
|
107
113
|
return;
|
|
108
114
|
}
|
|
@@ -223,11 +229,11 @@ __decorate([
|
|
|
223
229
|
})
|
|
224
230
|
], CreateNewApp.prototype, "token", void 0);
|
|
225
231
|
__decorate([
|
|
226
|
-
flags.boolean({ description: '
|
|
227
|
-
], CreateNewApp.prototype, "
|
|
232
|
+
flags.boolean({ description: 'Packages installation' })
|
|
233
|
+
], CreateNewApp.prototype, "install", void 0);
|
|
228
234
|
__decorate([
|
|
229
|
-
flags.boolean({ description: '
|
|
230
|
-
], CreateNewApp.prototype, "
|
|
235
|
+
flags.boolean({ description: 'Git initialization' })
|
|
236
|
+
], CreateNewApp.prototype, "gitInit", void 0);
|
|
231
237
|
__decorate([
|
|
232
238
|
flags.string({ description: 'Explicitly define the package manager to npm', flagName: 'pkg' })
|
|
233
239
|
], CreateNewApp.prototype, "packageManager", void 0);
|