oclif 3.11.2 → 3.11.3
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/.oclif.manifest.json +1 -1
- package/lib/generators/cli.js +3 -2
- package/package.json +1 -1
package/.oclif.manifest.json
CHANGED
package/lib/generators/cli.js
CHANGED
|
@@ -23,10 +23,11 @@ class CLI extends Generator {
|
|
|
23
23
|
yarn: hasYarn,
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
|
+
// eslint-disable-next-line complexity
|
|
26
27
|
async prompting() {
|
|
27
28
|
const msg = 'Time to build an oclif CLI!';
|
|
28
29
|
this.log(`${msg} Version: ${version}`);
|
|
29
|
-
const { moduleType } = await this.prompt([
|
|
30
|
+
const { moduleType } = process.env.OCLIF_ALLOW_ESM ? await this.prompt([
|
|
30
31
|
{
|
|
31
32
|
type: 'list',
|
|
32
33
|
name: 'moduleType',
|
|
@@ -37,7 +38,7 @@ class CLI extends Generator {
|
|
|
37
38
|
],
|
|
38
39
|
default: 'cjs',
|
|
39
40
|
},
|
|
40
|
-
]);
|
|
41
|
+
]) : 'cjs';
|
|
41
42
|
const repo = moduleType === 'esm' ? 'hello-world-esm' : 'hello-world';
|
|
42
43
|
(0, child_process_1.execSync)(`git clone https://github.com/oclif/${repo}.git "${path.resolve(this.name)}" --depth=1`);
|
|
43
44
|
fs.rmSync(`${path.resolve(this.name, '.git')}`, { recursive: true });
|