Skip to content

Commit a6428fb

Browse files
authored
The option "none" for prompt "Which bundler to use?" can be misleading (microsoft#472)
1 parent 4a9dae3 commit a6428fb

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

generators/app/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export default class extends Generator {
4444
this.option('extensionDescription', { type: String, description: 'Description of the extension' });
4545

4646
this.option('pkgManager', { type: String, description: `'npm', 'yarn' or 'pnpm'` });
47-
this.option('bundler', { type: String, default: 'none', description: `Bundle the extension: 'webpack', 'esbuild', 'none` });
47+
this.option('bundler', { type: String, description: `Bundle the extension: 'webpack', 'esbuild'` });
4848
this.option('gitInit', { type: Boolean, description: `Initialize a git repo` });
4949

5050
this.option('snippetFolder', { type: String, description: `Snippet folder location` });

generators/app/prompts.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ export function askForPackageManager(generator, extensionConfig) {
161161
* @param {Generator} generator
162162
* @param {Object} extensionConfig
163163
*/
164-
export function askForBundler(generator, extensionConfig, allowNone = true, defaultBundler = 'none') {
164+
export function askForBundler(generator, extensionConfig, allowNone = true, defaultBundler = 'unbundled') {
165165
const bundler = generator.options['bundler'];
166166
if (bundler === 'webpack' || bundler === 'esbuild') {
167167
extensionConfig.bundler = bundler;
@@ -177,7 +177,7 @@ export function askForBundler(generator, extensionConfig, allowNone = true, defa
177177
return Promise.resolve();
178178
}
179179

180-
const choices = allowNone ? [{ name: 'none', value: 'none' }] : [];
180+
const choices = allowNone ? [{ name: 'unbundled', value: 'unbundled' }] : [];
181181

182182
return generator.prompt({
183183
type: 'list',

test/test-integration.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ describe('integration tests', function () {
2727
description: 'My TestCom',
2828
gitInit: false,
2929
pkgManager: 'npm',
30-
bundler: 'none',
30+
bundler: 'unbundled',
3131
openWith: 'skip'
3232
});
3333

test/test.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,7 @@ describe('test code generator', function () {
627627
description: 'My TestCom',
628628
gitInit: true,
629629
pkgManager: 'npm',
630-
bundler: 'none',
630+
bundler: 'unbundled',
631631
openWith: 'skip'
632632
}); // Mock the prompt answers
633633

@@ -690,7 +690,7 @@ describe('test code generator', function () {
690690
description: 'My TestCom',
691691
gitInit: false,
692692
pkgManager: 'yarn',
693-
bundler: 'none',
693+
bundler: 'unbundled',
694694
openWith: 'skip'
695695
}); // Mock the prompt answers
696696

@@ -770,7 +770,7 @@ describe('test code generator', function () {
770770
description: 'My TestCom',
771771
gitInit: false,
772772
pkgManager: 'pnpm',
773-
bundler: 'none',
773+
bundler: 'unbundled',
774774
openWith: 'skip'
775775
}); // Mock the prompt answers
776776

0 commit comments

Comments
 (0)