@salesforce/plugin-templates 56.14.0 → 56.15.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 +44 -29
- package/lib/commands/template/generate/lightning/component.d.ts +1 -1
- package/lib/commands/template/generate/lightning/component.js +22 -3
- package/lib/commands/template/generate/lightning/component.js.map +1 -1
- package/lib/commands/template/generate/project/index.d.ts +1 -1
- package/messages/lightning.md +1 -1
- package/messages/lightningCmp.md +4 -0
- package/messages/messages.md +1 -1
- package/messages/project.md +2 -2
- package/oclif.manifest.json +443 -441
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -177,7 +177,7 @@ FLAG DESCRIPTIONS
|
|
|
177
177
|
directory.
|
|
178
178
|
```
|
|
179
179
|
|
|
180
|
-
_See code: [src/commands/template/generate/analytics/template.ts](https://github.com/salesforcecli/plugin-templates/blob/56.
|
|
180
|
+
_See code: [src/commands/template/generate/analytics/template.ts](https://github.com/salesforcecli/plugin-templates/blob/56.15.1/src/commands/template/generate/analytics/template.ts)_
|
|
181
181
|
|
|
182
182
|
## `sf template generate apex class`
|
|
183
183
|
|
|
@@ -237,7 +237,7 @@ FLAG DESCRIPTIONS
|
|
|
237
237
|
Supplied parameter values or default values are filled into a copy of the template.
|
|
238
238
|
```
|
|
239
239
|
|
|
240
|
-
_See code: [src/commands/template/generate/apex/class.ts](https://github.com/salesforcecli/plugin-templates/blob/56.
|
|
240
|
+
_See code: [src/commands/template/generate/apex/class.ts](https://github.com/salesforcecli/plugin-templates/blob/56.15.1/src/commands/template/generate/apex/class.ts)_
|
|
241
241
|
|
|
242
242
|
## `sf template generate apex trigger`
|
|
243
243
|
|
|
@@ -307,7 +307,7 @@ FLAG DESCRIPTIONS
|
|
|
307
307
|
Supplied parameter values or default values are filled into a copy of the template.
|
|
308
308
|
```
|
|
309
309
|
|
|
310
|
-
_See code: [src/commands/template/generate/apex/trigger.ts](https://github.com/salesforcecli/plugin-templates/blob/56.
|
|
310
|
+
_See code: [src/commands/template/generate/apex/trigger.ts](https://github.com/salesforcecli/plugin-templates/blob/56.15.1/src/commands/template/generate/apex/trigger.ts)_
|
|
311
311
|
|
|
312
312
|
## `sf template generate digital-experience site`
|
|
313
313
|
|
|
@@ -361,7 +361,7 @@ FLAG DESCRIPTIONS
|
|
|
361
361
|
project, defaults to the current directory.
|
|
362
362
|
```
|
|
363
363
|
|
|
364
|
-
_See code: [src/commands/template/generate/digital-experience/site.ts](https://github.com/salesforcecli/plugin-templates/blob/56.
|
|
364
|
+
_See code: [src/commands/template/generate/digital-experience/site.ts](https://github.com/salesforcecli/plugin-templates/blob/56.15.1/src/commands/template/generate/digital-experience/site.ts)_
|
|
365
365
|
|
|
366
366
|
## `sf template generate flexipage`
|
|
367
367
|
|
|
@@ -443,7 +443,7 @@ FLAG DESCRIPTIONS
|
|
|
443
443
|
'Custom_Object__c'. This sets the `sobjectType` field in the FlexiPage metadata.
|
|
444
444
|
```
|
|
445
445
|
|
|
446
|
-
_See code: [src/commands/template/generate/flexipage/index.ts](https://github.com/salesforcecli/plugin-templates/blob/56.
|
|
446
|
+
_See code: [src/commands/template/generate/flexipage/index.ts](https://github.com/salesforcecli/plugin-templates/blob/56.15.1/src/commands/template/generate/flexipage/index.ts)_
|
|
447
447
|
|
|
448
448
|
## `sf template generate lightning app`
|
|
449
449
|
|
|
@@ -496,10 +496,12 @@ FLAG DESCRIPTIONS
|
|
|
496
496
|
|
|
497
497
|
-t, --template=DefaultLightningApp Template to use for file creation.
|
|
498
498
|
|
|
499
|
-
Supplied parameter values or default values are filled into a copy of the template.
|
|
499
|
+
Supplied parameter values or default values are filled into a copy of the template. For Lightning Web Components, if
|
|
500
|
+
this flag isn't specified, the CLI command automatically selects the template based on the "defaultLwcLanguage"
|
|
501
|
+
field in the DX project's "sfdx-project.json" file.
|
|
500
502
|
```
|
|
501
503
|
|
|
502
|
-
_See code: [src/commands/template/generate/lightning/app.ts](https://github.com/salesforcecli/plugin-templates/blob/56.
|
|
504
|
+
_See code: [src/commands/template/generate/lightning/app.ts](https://github.com/salesforcecli/plugin-templates/blob/56.15.1/src/commands/template/generate/lightning/app.ts)_
|
|
503
505
|
|
|
504
506
|
## `sf template generate lightning component`
|
|
505
507
|
|
|
@@ -508,13 +510,14 @@ Generate a bundle for an Aura component or a Lightning web component.
|
|
|
508
510
|
```
|
|
509
511
|
USAGE
|
|
510
512
|
$ sf template generate lightning component -n <value> [--json] [--flags-dir <value>] [-t
|
|
511
|
-
default|analyticsDashboard|analyticsDashboardWithStep] [-d <value>] [--api-version <value>] [--type
|
|
513
|
+
default|analyticsDashboard|analyticsDashboardWithStep|typescript] [-d <value>] [--api-version <value>] [--type
|
|
514
|
+
aura|lwc]
|
|
512
515
|
|
|
513
516
|
FLAGS
|
|
514
517
|
-d, --output-dir=<value> [default: .] Directory for saving the created files.
|
|
515
518
|
-n, --name=<value> (required) Name of the generated Lightning Component.
|
|
516
519
|
-t, --template=<option> [default: default] Template to use for file creation.
|
|
517
|
-
<options: default|analyticsDashboard|analyticsDashboardWithStep>
|
|
520
|
+
<options: default|analyticsDashboard|analyticsDashboardWithStep|typescript>
|
|
518
521
|
--api-version=<value> Override the api version used for api requests made by this command
|
|
519
522
|
--type=<option> [default: aura] Type of the component bundle.
|
|
520
523
|
<options: aura|lwc>
|
|
@@ -554,6 +557,10 @@ EXAMPLES
|
|
|
554
557
|
|
|
555
558
|
$ sf template generate lightning component --name mycomponent --type lwc --output-dir force-app/main/default/lwc
|
|
556
559
|
|
|
560
|
+
Generate a TypeScript Lightning Web Component:
|
|
561
|
+
|
|
562
|
+
$ sf template generate lightning component --name mycomponent --type lwc --template typescript
|
|
563
|
+
|
|
557
564
|
FLAG DESCRIPTIONS
|
|
558
565
|
-d, --output-dir=<value> Directory for saving the created files.
|
|
559
566
|
|
|
@@ -564,12 +571,14 @@ FLAG DESCRIPTIONS
|
|
|
564
571
|
|
|
565
572
|
The name can be up to 40 characters and must start with a letter.
|
|
566
573
|
|
|
567
|
-
-t, --template=default|analyticsDashboard|analyticsDashboardWithStep Template to use for file creation.
|
|
574
|
+
-t, --template=default|analyticsDashboard|analyticsDashboardWithStep|typescript Template to use for file creation.
|
|
568
575
|
|
|
569
|
-
Supplied parameter values or default values are filled into a copy of the template.
|
|
576
|
+
Supplied parameter values or default values are filled into a copy of the template. For Lightning Web Components, if
|
|
577
|
+
this flag isn't specified, the CLI command automatically selects the template based on the "defaultLwcLanguage"
|
|
578
|
+
field in the DX project's "sfdx-project.json" file.
|
|
570
579
|
```
|
|
571
580
|
|
|
572
|
-
_See code: [src/commands/template/generate/lightning/component.ts](https://github.com/salesforcecli/plugin-templates/blob/56.
|
|
581
|
+
_See code: [src/commands/template/generate/lightning/component.ts](https://github.com/salesforcecli/plugin-templates/blob/56.15.1/src/commands/template/generate/lightning/component.ts)_
|
|
573
582
|
|
|
574
583
|
## `sf template generate lightning event`
|
|
575
584
|
|
|
@@ -622,10 +631,12 @@ FLAG DESCRIPTIONS
|
|
|
622
631
|
|
|
623
632
|
-t, --template=DefaultLightningEvt Template to use for file creation.
|
|
624
633
|
|
|
625
|
-
Supplied parameter values or default values are filled into a copy of the template.
|
|
634
|
+
Supplied parameter values or default values are filled into a copy of the template. For Lightning Web Components, if
|
|
635
|
+
this flag isn't specified, the CLI command automatically selects the template based on the "defaultLwcLanguage"
|
|
636
|
+
field in the DX project's "sfdx-project.json" file.
|
|
626
637
|
```
|
|
627
638
|
|
|
628
|
-
_See code: [src/commands/template/generate/lightning/event.ts](https://github.com/salesforcecli/plugin-templates/blob/56.
|
|
639
|
+
_See code: [src/commands/template/generate/lightning/event.ts](https://github.com/salesforcecli/plugin-templates/blob/56.15.1/src/commands/template/generate/lightning/event.ts)_
|
|
629
640
|
|
|
630
641
|
## `sf template generate lightning interface`
|
|
631
642
|
|
|
@@ -678,10 +689,12 @@ FLAG DESCRIPTIONS
|
|
|
678
689
|
|
|
679
690
|
-t, --template=DefaultLightningIntf Template to use for file creation.
|
|
680
691
|
|
|
681
|
-
Supplied parameter values or default values are filled into a copy of the template.
|
|
692
|
+
Supplied parameter values or default values are filled into a copy of the template. For Lightning Web Components, if
|
|
693
|
+
this flag isn't specified, the CLI command automatically selects the template based on the "defaultLwcLanguage"
|
|
694
|
+
field in the DX project's "sfdx-project.json" file.
|
|
682
695
|
```
|
|
683
696
|
|
|
684
|
-
_See code: [src/commands/template/generate/lightning/interface.ts](https://github.com/salesforcecli/plugin-templates/blob/56.
|
|
697
|
+
_See code: [src/commands/template/generate/lightning/interface.ts](https://github.com/salesforcecli/plugin-templates/blob/56.15.1/src/commands/template/generate/lightning/interface.ts)_
|
|
685
698
|
|
|
686
699
|
## `sf template generate lightning test`
|
|
687
700
|
|
|
@@ -734,10 +747,12 @@ FLAG DESCRIPTIONS
|
|
|
734
747
|
|
|
735
748
|
-t, --template=DefaultLightningTest Template to use for file creation.
|
|
736
749
|
|
|
737
|
-
Supplied parameter values or default values are filled into a copy of the template.
|
|
750
|
+
Supplied parameter values or default values are filled into a copy of the template. For Lightning Web Components, if
|
|
751
|
+
this flag isn't specified, the CLI command automatically selects the template based on the "defaultLwcLanguage"
|
|
752
|
+
field in the DX project's "sfdx-project.json" file.
|
|
738
753
|
```
|
|
739
754
|
|
|
740
|
-
_See code: [src/commands/template/generate/lightning/test.ts](https://github.com/salesforcecli/plugin-templates/blob/56.
|
|
755
|
+
_See code: [src/commands/template/generate/lightning/test.ts](https://github.com/salesforcecli/plugin-templates/blob/56.15.1/src/commands/template/generate/lightning/test.ts)_
|
|
741
756
|
|
|
742
757
|
## `sf template generate project`
|
|
743
758
|
|
|
@@ -758,7 +773,7 @@ FLAGS
|
|
|
758
773
|
<options: standard|empty|analytics|reactinternalapp|reactexternalapp|agent>
|
|
759
774
|
-x, --manifest Generate a manifest (package.xml) for change-set based development.
|
|
760
775
|
--api-version=<value> Will set this version as sourceApiVersion in the sfdx-project.json file
|
|
761
|
-
--lwc-language=<option>
|
|
776
|
+
--lwc-language=<option> Language of the Lightning Web Components. If not specified, "javascript" is used.
|
|
762
777
|
<options: javascript|typescript>
|
|
763
778
|
|
|
764
779
|
GLOBAL FLAGS
|
|
@@ -855,15 +870,15 @@ FLAG DESCRIPTIONS
|
|
|
855
870
|
|
|
856
871
|
Override the api version used for api requests made by this command
|
|
857
872
|
|
|
858
|
-
--lwc-language=javascript|typescript
|
|
873
|
+
--lwc-language=javascript|typescript Language of the Lightning Web Components. If not specified, "javascript" is used.
|
|
859
874
|
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
875
|
+
When set to `'typescript'`, generates TypeScript configuration files (tsconfig.json, package.json with TypeScript
|
|
876
|
+
dependencies, and TypeScript-aware ESLint config). When you deploy the TypeScript-based Lightning Web Components,
|
|
877
|
+
the TypeScript files are first compiled locally for validation and then the `.ts` files are deployed to your org for
|
|
878
|
+
server-side type stripping.
|
|
864
879
|
```
|
|
865
880
|
|
|
866
|
-
_See code: [src/commands/template/generate/project/index.ts](https://github.com/salesforcecli/plugin-templates/blob/56.
|
|
881
|
+
_See code: [src/commands/template/generate/project/index.ts](https://github.com/salesforcecli/plugin-templates/blob/56.15.1/src/commands/template/generate/project/index.ts)_
|
|
867
882
|
|
|
868
883
|
## `sf template generate static-resource`
|
|
869
884
|
|
|
@@ -926,7 +941,7 @@ FLAG DESCRIPTIONS
|
|
|
926
941
|
etc.
|
|
927
942
|
```
|
|
928
943
|
|
|
929
|
-
_See code: [src/commands/template/generate/static-resource/index.ts](https://github.com/salesforcecli/plugin-templates/blob/56.
|
|
944
|
+
_See code: [src/commands/template/generate/static-resource/index.ts](https://github.com/salesforcecli/plugin-templates/blob/56.15.1/src/commands/template/generate/static-resource/index.ts)_
|
|
930
945
|
|
|
931
946
|
## `sf template generate ui-bundle`
|
|
932
947
|
|
|
@@ -1010,7 +1025,7 @@ FLAG DESCRIPTIONS
|
|
|
1010
1025
|
Supplied parameter values or default values are filled into a copy of the template.
|
|
1011
1026
|
```
|
|
1012
1027
|
|
|
1013
|
-
_See code: [src/commands/template/generate/ui-bundle/index.ts](https://github.com/salesforcecli/plugin-templates/blob/56.
|
|
1028
|
+
_See code: [src/commands/template/generate/ui-bundle/index.ts](https://github.com/salesforcecli/plugin-templates/blob/56.15.1/src/commands/template/generate/ui-bundle/index.ts)_
|
|
1014
1029
|
|
|
1015
1030
|
## `sf template generate visualforce component`
|
|
1016
1031
|
|
|
@@ -1067,7 +1082,7 @@ FLAG DESCRIPTIONS
|
|
|
1067
1082
|
Supplied parameter values or default values are filled into a copy of the template.
|
|
1068
1083
|
```
|
|
1069
1084
|
|
|
1070
|
-
_See code: [src/commands/template/generate/visualforce/component.ts](https://github.com/salesforcecli/plugin-templates/blob/56.
|
|
1085
|
+
_See code: [src/commands/template/generate/visualforce/component.ts](https://github.com/salesforcecli/plugin-templates/blob/56.15.1/src/commands/template/generate/visualforce/component.ts)_
|
|
1071
1086
|
|
|
1072
1087
|
## `sf template generate visualforce page`
|
|
1073
1088
|
|
|
@@ -1118,6 +1133,6 @@ FLAG DESCRIPTIONS
|
|
|
1118
1133
|
The name can be up to 40 characters and must start with a letter.
|
|
1119
1134
|
```
|
|
1120
1135
|
|
|
1121
|
-
_See code: [src/commands/template/generate/visualforce/page.ts](https://github.com/salesforcecli/plugin-templates/blob/56.
|
|
1136
|
+
_See code: [src/commands/template/generate/visualforce/page.ts](https://github.com/salesforcecli/plugin-templates/blob/56.15.1/src/commands/template/generate/visualforce/page.ts)_
|
|
1122
1137
|
|
|
1123
1138
|
<!-- commandsstop -->
|
|
@@ -8,7 +8,7 @@ export default class LightningComponent extends SfCommand<CreateOutput> {
|
|
|
8
8
|
static readonly deprecateAliases = true;
|
|
9
9
|
static readonly flags: {
|
|
10
10
|
name: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
-
template: import("@oclif/core/interfaces").OptionFlag<"default" | "analyticsDashboard" | "analyticsDashboardWithStep", import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
+
template: import("@oclif/core/interfaces").OptionFlag<"default" | "analyticsDashboard" | "analyticsDashboardWithStep" | "typescript", import("@oclif/core/interfaces").CustomOptions>;
|
|
12
12
|
'output-dir': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
13
|
'api-version': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
14
|
type: import("@oclif/core/interfaces").OptionFlag<"aura" | "lwc", import("@oclif/core/interfaces").CustomOptions>;
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
// tslint:disable:no-unused-expression
|
|
8
8
|
import { Flags, loglevel, orgApiVersionFlagWithDeprecations, SfCommand, Ux } from '@salesforce/sf-plugins-core';
|
|
9
9
|
import { TemplateType } from '@salesforce/templates';
|
|
10
|
-
import { Messages } from '@salesforce/core';
|
|
10
|
+
import { Messages, SfProject } from '@salesforce/core';
|
|
11
11
|
import { getCustomTemplates, runGenerator } from '../../../../utils/templateCommand.js';
|
|
12
12
|
import { internalFlag, outputDirFlagLightning } from '../../../../utils/flags.js';
|
|
13
13
|
const BUNDLE_TYPE = 'Component';
|
|
@@ -36,7 +36,7 @@ export default class LightningComponent extends SfCommand {
|
|
|
36
36
|
default: 'default',
|
|
37
37
|
// Note: keep this list here and LightningComponentOptions#template in-sync with the
|
|
38
38
|
// templates/lightningcomponents/[aura|lwc]/* folders
|
|
39
|
-
options: ['default', 'analyticsDashboard', 'analyticsDashboardWithStep'],
|
|
39
|
+
options: ['default', 'analyticsDashboard', 'analyticsDashboardWithStep', 'typescript'],
|
|
40
40
|
})(),
|
|
41
41
|
'output-dir': outputDirFlagLightning,
|
|
42
42
|
'api-version': orgApiVersionFlagWithDeprecations,
|
|
@@ -50,9 +50,28 @@ export default class LightningComponent extends SfCommand {
|
|
|
50
50
|
};
|
|
51
51
|
async run() {
|
|
52
52
|
const { flags } = await this.parse(LightningComponent);
|
|
53
|
+
// Determine if user explicitly set the template flag
|
|
54
|
+
const userExplicitlySetTemplate = this.argv.includes('--template') || this.argv.includes('-t');
|
|
55
|
+
let template = flags.template;
|
|
56
|
+
// If template not explicitly provided and generating LWC, check project preference
|
|
57
|
+
if (!userExplicitlySetTemplate && flags.type === 'lwc') {
|
|
58
|
+
try {
|
|
59
|
+
const projectPath = flags['output-dir'] || process.cwd();
|
|
60
|
+
const project = await SfProject.resolve(projectPath);
|
|
61
|
+
const projectJson = await project.resolveProjectConfig();
|
|
62
|
+
const defaultLwcLanguage = projectJson.defaultLwcLanguage;
|
|
63
|
+
if (defaultLwcLanguage === 'typescript') {
|
|
64
|
+
template = 'typescript';
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
catch (error) {
|
|
68
|
+
this.debug('Could not resolve project config for intelligent defaulting:', error);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
53
71
|
const flagsAsOptions = {
|
|
54
72
|
componentname: flags.name,
|
|
55
|
-
|
|
73
|
+
// Temp re-mapping to allow lowercase typescript flag
|
|
74
|
+
template: template === 'typescript' ? 'typeScript' : template,
|
|
56
75
|
outputdir: flags['output-dir'],
|
|
57
76
|
apiversion: flags['api-version'],
|
|
58
77
|
internal: flags.internal,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sourceRoot":"","sources":["../../../../../src/commands/template/generate/lightning/component.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,sCAAsC;AAEtC,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,iCAAiC,EAAE,SAAS,EAAE,EAAE,EAAE,MAAM,6BAA6B,CAAC;AAChH,OAAO,EAA2C,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC9F,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"component.js","sourceRoot":"","sources":["../../../../../src/commands/template/generate/lightning/component.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,sCAAsC;AAEtC,OAAO,EAAE,KAAK,EAAE,QAAQ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O,GAAG,MAAM,SAAS,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;gBACrD,MAAM,WAAW,GAAG,MAAM,OAAO,CAAC,oBAAoB,EAAE,CAAC;gBACzD,MAAM,kBAAkB,GAAG,WAAW,CAAC,kBAAwC,CAAC;gBAEhF,IAAI,kBAAkB,KAAK,YAAY,EAAE,CAAC;oBACxC,QAAQ,GAAG,YAAY,CAAC;gBAC1B,CAAC;YACH,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,IAAI,CAAC,KAAK,CAAC,8DAA8D,EAAE,KAAK,CAAC,CAAC;YACpF,CAAC;QACH,CAAC;QAED,MAAM,cAAc,GAA8B;YAChD,aAAa,EAAE,KAAK,CAAC,IAAI;YACzB,qDAAqD;YACrD,QAAQ,EAAE,QAAQ,KAAK,YAAY,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,QAAQ;YAC7D,SAAS,EAAE,KAAK,CAAC,YAAY,CAAC;YAC9B,UAAU,EAAE,KAAK,CAAC,aAAa,CAAC;YAChC,QAAQ,EAAE,KAAK,CAAC,QAAQ;YACxB,IAAI,EAAE,KAAK,CAAC,IAAI;SACjB,CAAC;QACF,OAAO,YAAY,CAAC;YAClB,YAAY,EAAE,YAAY,CAAC,kBAAkB;YAC7C,IAAI,EAAE,cAAc;YACpB,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC;YAC/C,SAAS,EAAE,kBAAkB,CAAC,IAAI,CAAC,gBAAgB,CAAC;SACrD,CAAC,CAAC;IACL,CAAC"}
|
|
@@ -14,7 +14,7 @@ export default class Project extends SfCommand<CreateOutput> {
|
|
|
14
14
|
'default-package-dir': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
15
|
manifest: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
16
16
|
'login-url': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
|
-
'lwc-language': import("@oclif/core/interfaces").OptionFlag<"
|
|
17
|
+
'lwc-language': import("@oclif/core/interfaces").OptionFlag<"typescript" | "javascript" | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
18
18
|
loglevel: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
19
19
|
'api-version': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
20
20
|
};
|
package/messages/lightning.md
CHANGED
|
@@ -24,4 +24,4 @@ Template to use for file creation.
|
|
|
24
24
|
|
|
25
25
|
# flags.template.description
|
|
26
26
|
|
|
27
|
-
Supplied parameter values or default values are filled into a copy of the template.
|
|
27
|
+
Supplied parameter values or default values are filled into a copy of the template. For Lightning Web Components, if this flag isn't specified, the CLI command automatically selects the template based on the "defaultLwcLanguage" field in the DX project's "sfdx-project.json" file.
|
package/messages/lightningCmp.md
CHANGED
|
@@ -16,6 +16,10 @@
|
|
|
16
16
|
|
|
17
17
|
<%= config.bin %> <%= command.id %> --name mycomponent --type lwc --output-dir force-app/main/default/lwc
|
|
18
18
|
|
|
19
|
+
- Generate a TypeScript Lightning Web Component:
|
|
20
|
+
|
|
21
|
+
<%= config.bin %> <%= command.id %> --name mycomponent --type lwc --template typescript
|
|
22
|
+
|
|
19
23
|
# summary
|
|
20
24
|
|
|
21
25
|
Generate a bundle for an Aura component or a Lightning web component.
|
package/messages/messages.md
CHANGED
|
@@ -8,7 +8,7 @@ The location can be an absolute path or relative to the current working director
|
|
|
8
8
|
|
|
9
9
|
# flags.outputdirLighting.description
|
|
10
10
|
|
|
11
|
-
If you don’t specify an
|
|
11
|
+
If you don’t specify an output-dir, we create a subfolder in your current working directory with the name of your bundle. For example, if the current working directory is force-app and your Lightning bundle is called myBundle, we create force-app/myBundle/ to store the files in the bundle.
|
|
12
12
|
|
|
13
13
|
# flags.template.summary
|
|
14
14
|
|
package/messages/project.md
CHANGED
|
@@ -100,8 +100,8 @@ Normally defaults to https://login.salesforce.com.
|
|
|
100
100
|
|
|
101
101
|
# flags.lwc-language.summary
|
|
102
102
|
|
|
103
|
-
|
|
103
|
+
Language of the Lightning Web Components. If not specified, "javascript" is used.
|
|
104
104
|
|
|
105
105
|
# flags.lwc-language.description
|
|
106
106
|
|
|
107
|
-
|
|
107
|
+
When set to `'typescript'`, generates TypeScript configuration files (tsconfig.json, package.json with TypeScript dependencies, and TypeScript-aware ESLint config). When you deploy the TypeScript-based Lightning Web Components, the TypeScript files are first compiled locally for validation and then the `.ts` files are deployed to your org for server-side type stripping.
|