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 CHANGED
@@ -82,9 +82,11 @@ npm init adonisjs -- --pkg="yarn"
82
82
  ### Other options
83
83
 
84
84
  | Option | Description |
85
- | ----------------- | --------------------------------- |
86
- | `--skip-install` | Skip installing dependencies. |
87
- | `--skip-git-init` | Skip initializing git repository. |
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
 
@@ -23,11 +23,11 @@ export declare class CreateNewApp extends BaseCommand {
23
23
  /**
24
24
  * Skip packages installation
25
25
  */
26
- skipInstall: boolean;
26
+ install?: boolean;
27
27
  /**
28
28
  * Skip git initialization
29
29
  */
30
- skipGitInit: boolean;
30
+ gitInit?: boolean;
31
31
  /**
32
32
  * Package manager to use
33
33
  */
@@ -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.skipInstall) {
76
+ if (this.install === false) {
77
77
  return;
78
78
  }
79
- this.#shouldInstallDependencies = await this.prompt.confirm('Do you want to install dependencies?', { hint: this.packageManager + ' will be used', default: true });
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.skipGitInit) {
105
+ if (this.gitInit === false) {
101
106
  return;
102
107
  }
103
- const shouldInit = await this.prompt.confirm('Do you want to initialize a git repository?', {
104
- default: true,
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: 'Skip packages installation' })
227
- ], CreateNewApp.prototype, "skipInstall", void 0);
232
+ flags.boolean({ description: 'Packages installation' })
233
+ ], CreateNewApp.prototype, "install", void 0);
228
234
  __decorate([
229
- flags.boolean({ description: 'Skip git initialization' })
230
- ], CreateNewApp.prototype, "skipGitInit", void 0);
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);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "create-adonisjs",
3
3
  "description": "Scaffold new AdonisJS applications using starter kits",
4
- "version": "1.2.2-0",
4
+ "version": "1.2.2-1",
5
5
  "main": "build/index.js",
6
6
  "type": "module",
7
7
  "files": [