@salesforce/plugin-templates 56.0.25 → 56.1.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
@@ -118,13 +118,747 @@ Congrats, you are debugging!
118
118
 
119
119
  <!-- commands -->
120
120
 
121
- # Command Topics
122
-
123
- - [`sf analytics`](docs/analytics.md) - Work with analytics assets.
124
- - [`sf apex`](docs/apex.md)
125
- - [`sf lightning`](docs/lightning.md) - Work with Lightning Web and Aura components.
126
- - [`sf project`](docs/project.md) - Work with projects, such as deploy and retrieve metadata.
127
- - [`sf static-resource`](docs/static-resource.md) - Work with static resources.
128
- - [`sf visualforce`](docs/visualforce.md) - Work with Visualforce components.
121
+ - [`sf analytics generate template`](#sf-analytics-generate-template)
122
+ - [`sf apex generate class`](#sf-apex-generate-class)
123
+ - [`sf apex generate trigger`](#sf-apex-generate-trigger)
124
+ - [`sf lightning generate app`](#sf-lightning-generate-app)
125
+ - [`sf lightning generate component`](#sf-lightning-generate-component)
126
+ - [`sf lightning generate event`](#sf-lightning-generate-event)
127
+ - [`sf lightning generate interface`](#sf-lightning-generate-interface)
128
+ - [`sf lightning generate test`](#sf-lightning-generate-test)
129
+ - [`sf project generate`](#sf-project-generate)
130
+ - [`sf static-resource generate`](#sf-static-resource-generate)
131
+ - [`sf visualforce generate component`](#sf-visualforce-generate-component)
132
+ - [`sf visualforce generate page`](#sf-visualforce-generate-page)
133
+
134
+ ## `sf analytics generate template`
135
+
136
+ Generate a simple Analytics template.
137
+
138
+ ```
139
+ USAGE
140
+ $ sf analytics generate template -n <value> [--json] [--flags-dir <value>] [-d <value>] [--api-version <value>]
141
+
142
+ FLAGS
143
+ -d, --output-dir=<value> [default: .] Directory for saving the created files.
144
+ -n, --name=<value> (required) Name of the Analytics template.
145
+ --api-version=<value> Override the api version used for api requests made by this command
146
+
147
+ GLOBAL FLAGS
148
+ --flags-dir=<value> Import flag values from a directory.
149
+ --json Format output as json.
150
+
151
+ DESCRIPTION
152
+ Generate a simple Analytics template.
153
+
154
+ The metadata files associated with the Analytics template must be contained in a parent directory called
155
+ "waveTemplates" in your package directory. Either run this command from an existing directory of this name, or use the
156
+ --output-dir flag to generate one or point to an existing one.
157
+
158
+ ALIASES
159
+ $ sf force analytics template create
160
+
161
+ EXAMPLES
162
+ Generate the metadata files for a simple Analytics template file called myTemplate in the
163
+ force-app/main/default/waveTemplates directory:
164
+
165
+ $ sf analytics generate template --name myTemplate --output-dir force-app/main/default/waveTemplates
166
+
167
+ FLAG DESCRIPTIONS
168
+ -d, --output-dir=<value> Directory for saving the created files.
169
+
170
+ The location can be an absolute path or relative to the current working directory. The default is the current
171
+ directory.
172
+ ```
173
+
174
+ _See code: [src/commands/analytics/generate/template.ts](https://github.com/salesforcecli/plugin-templates/blob/56.1.1/src/commands/analytics/generate/template.ts)_
175
+
176
+ ## `sf apex generate class`
177
+
178
+ Generate an Apex class.
179
+
180
+ ```
181
+ USAGE
182
+ $ sf apex generate class -n <value> [--json] [--flags-dir <value>] [-t
183
+ ApexException|ApexUnitTest|DefaultApexClass|InboundEmailService] [-d <value>] [--api-version <value>]
184
+
185
+ FLAGS
186
+ -d, --output-dir=<value> [default: .] Directory for saving the created files.
187
+ -n, --name=<value> (required) Name of the generated Apex class.
188
+ -t, --template=<option> [default: DefaultApexClass] Template to use for file creation.
189
+ <options: ApexException|ApexUnitTest|DefaultApexClass|InboundEmailService>
190
+ --api-version=<value> Override the api version used for api requests made by this command
191
+
192
+ GLOBAL FLAGS
193
+ --flags-dir=<value> Import flag values from a directory.
194
+ --json Format output as json.
195
+
196
+ DESCRIPTION
197
+ Generate an Apex class.
198
+
199
+ Generates the Apex *.cls file and associated metadata file. These files must be contained in a parent directory called
200
+ "classes" in your package directory. Either run this command from an existing directory of this name, or use the
201
+ --output-dir flag to generate one or point to an existing one.
202
+
203
+ ALIASES
204
+ $ sf force apex class create
205
+
206
+ EXAMPLES
207
+ Generate two metadata files associated with the MyClass Apex class (MyClass.cls and MyClass.cls-meta.xml) in the
208
+ current directory:
209
+
210
+ $ sf apex generate class --name MyClass
211
+
212
+ Similar to previous example, but generates the files in the "force-app/main/default/classes" directory:
213
+
214
+ $ sf apex generate class --name MyClass --output-dir force-app/main/default/classes
215
+
216
+ FLAG DESCRIPTIONS
217
+ -d, --output-dir=<value> Directory for saving the created files.
218
+
219
+ The location can be an absolute path or relative to the current working directory. The default is the current
220
+ directory.
221
+
222
+ -n, --name=<value> Name of the generated Apex class.
223
+
224
+ The name can be up to 40 characters and must start with a letter.
225
+
226
+ -t, --template=ApexException|ApexUnitTest|DefaultApexClass|InboundEmailService Template to use for file creation.
227
+
228
+ Supplied parameter values or default values are filled into a copy of the template.
229
+ ```
230
+
231
+ _See code: [src/commands/apex/generate/class.ts](https://github.com/salesforcecli/plugin-templates/blob/56.1.1/src/commands/apex/generate/class.ts)_
232
+
233
+ ## `sf apex generate trigger`
234
+
235
+ Generate an Apex trigger.
236
+
237
+ ```
238
+ USAGE
239
+ $ sf apex generate trigger -n <value> [--json] [--flags-dir <value>] [-t ApexTrigger] [-d <value>] [--api-version
240
+ <value>] [-s <value>] [-e before insert|before update|before delete|after insert|after update|after delete|after
241
+ undelete]
242
+
243
+ FLAGS
244
+ -d, --output-dir=<value> [default: .] Directory for saving the created files.
245
+ -e, --event=<option>... [default: before insert] Events that fire the trigger.
246
+ <options: before insert|before update|before delete|after insert|after update|after
247
+ delete|after undelete>
248
+ -n, --name=<value> (required) Name of the generated Apex trigger
249
+ -s, --sobject=<value> [default: SOBJECT] Salesforce object to generate a trigger on.
250
+ -t, --template=<option> [default: ApexTrigger] Template to use for file creation.
251
+ <options: ApexTrigger>
252
+ --api-version=<value> Override the api version used for api requests made by this command
253
+
254
+ GLOBAL FLAGS
255
+ --flags-dir=<value> Import flag values from a directory.
256
+ --json Format output as json.
257
+
258
+ DESCRIPTION
259
+ Generate an Apex trigger.
260
+
261
+ Generates the Apex trigger *.trigger file and associated metadata file. These files must be contained in a parent
262
+ directory called "triggers" in your package directory. Either run this command from an existing directory of this
263
+ name, or use the --output-dir flag to generate one or point to an existing one.
264
+
265
+ If you don't specify the --sobject flag, the .trigger file contains the generic placeholder SOBJECT; replace it with
266
+ the Salesforce object you want to generate a trigger for. If you don't specify --event, "before insert" is used.
267
+
268
+ ALIASES
269
+ $ sf force apex trigger create
270
+
271
+ EXAMPLES
272
+ Generate two files associated with the MyTrigger Apex trigger (MyTrigger.trigger and MyTrigger.trigger-meta.xml) in
273
+ the current directory:
274
+
275
+ $ sf apex generate trigger --name MyTrigger
276
+
277
+ Similar to the previous example, but generate the files in the "force-app/main/default/triggers" directory:
278
+
279
+ $ sf apex generate trigger --name MyTrigger --output-dir force-app/main/default/triggers
280
+
281
+ Generate files for a trigger that fires on the Account object before and after an insert:
282
+
283
+ $ sf apex generate trigger --name MyTrigger --sobject Account --event "before insert,after insert"
284
+
285
+ FLAG DESCRIPTIONS
286
+ -d, --output-dir=<value> Directory for saving the created files.
287
+
288
+ The location can be an absolute path or relative to the current working directory. The default is the current
289
+ directory.
290
+
291
+ -n, --name=<value> Name of the generated Apex trigger
292
+
293
+ The name can be up to 40 characters and must start with a letter.
294
+
295
+ -t, --template=ApexTrigger Template to use for file creation.
296
+
297
+ Supplied parameter values or default values are filled into a copy of the template.
298
+ ```
299
+
300
+ _See code: [src/commands/apex/generate/trigger.ts](https://github.com/salesforcecli/plugin-templates/blob/56.1.1/src/commands/apex/generate/trigger.ts)_
301
+
302
+ ## `sf lightning generate app`
303
+
304
+ Generate a Lightning App.
305
+
306
+ ```
307
+ USAGE
308
+ $ sf lightning generate app -n <value> [--json] [--flags-dir <value>] [-t DefaultLightningApp] [-d <value>] [--api-version
309
+ <value>]
310
+
311
+ FLAGS
312
+ -d, --output-dir=<value> [default: .] Directory for saving the created files.
313
+ -n, --name=<value> (required) Name of the generated Lightning App.
314
+ -t, --template=<option> [default: DefaultLightningApp] Template to use for file creation.
315
+ <options: DefaultLightningApp>
316
+ --api-version=<value> Override the api version used for api requests made by this command
317
+
318
+ GLOBAL FLAGS
319
+ --flags-dir=<value> Import flag values from a directory.
320
+ --json Format output as json.
321
+
322
+ DESCRIPTION
323
+ Generate a Lightning App.
324
+
325
+ Generates a Lightning App bundle in the specified directory or the current working directory. The bundle consists of
326
+ multiple files in a folder with the designated name.
327
+
328
+ ALIASES
329
+ $ sf force lightning app create
330
+
331
+ EXAMPLES
332
+ Generate the metadata files for a Lightning app bundle called "myapp" in the current directory:
333
+
334
+ $ sf lightning generate app --name myapp
335
+
336
+ Similar to the previous example, but generate the files in the "force-app/main/default/aura" directory:
337
+
338
+ $ sf lightning generate app --name myapp --output-dir force-app/main/default/aura
339
+
340
+ FLAG DESCRIPTIONS
341
+ -d, --output-dir=<value> Directory for saving the created files.
342
+
343
+ The location can be an absolute path or relative to the current working directory. The default is the current
344
+ directory.
345
+
346
+ -n, --name=<value> Name of the generated Lightning App.
347
+
348
+ The name can be up to 40 characters and must start with a letter.
349
+
350
+ -t, --template=DefaultLightningApp Template to use for file creation.
351
+
352
+ Supplied parameter values or default values are filled into a copy of the template.
353
+ ```
354
+
355
+ _See code: [src/commands/lightning/generate/app.ts](https://github.com/salesforcecli/plugin-templates/blob/56.1.1/src/commands/lightning/generate/app.ts)_
356
+
357
+ ## `sf lightning generate component`
358
+
359
+ Generate a bundle for an Aura component or a Lightning web component.
360
+
361
+ ```
362
+ USAGE
363
+ $ sf lightning generate component -n <value> [--json] [--flags-dir <value>] [-t
364
+ default|analyticsDashboard|analyticsDashboardWithStep] [-d <value>] [--api-version <value>] [--type aura|lwc]
365
+
366
+ FLAGS
367
+ -d, --output-dir=<value> [default: .] Directory for saving the created files.
368
+ -n, --name=<value> (required) Name of the generated Lightning Component.
369
+ -t, --template=<option> [default: default] Template to use for file creation.
370
+ <options: default|analyticsDashboard|analyticsDashboardWithStep>
371
+ --api-version=<value> Override the api version used for api requests made by this command
372
+ --type=<option> [default: aura] Type of the component bundle.
373
+ <options: aura|lwc>
374
+
375
+ GLOBAL FLAGS
376
+ --flags-dir=<value> Import flag values from a directory.
377
+ --json Format output as json.
378
+
379
+ DESCRIPTION
380
+ Generate a bundle for an Aura component or a Lightning web component.
381
+
382
+ Generates the bundle in the specified directory or the current working directory. The bundle consists of multiple
383
+ files in a directory with the designated name. Lightning web components are contained in the directory with name
384
+ "lwc", Aura components in "aura".
385
+
386
+ To generate a Lightning web component, pass "--type lwc" to the command. If you don’t specify --type, Salesforce CLI
387
+ generates an Aura component by default.
388
+
389
+ ALIASES
390
+ $ sf force lightning component create
391
+
392
+ EXAMPLES
393
+ Generate the metadata files for an Aura component bundle in the current directory:
394
+
395
+ $ sf lightning generate component --name mycomponent
396
+
397
+ Generate a Lightning web component bundle in the current directory:
398
+
399
+ $ sf lightning generate component --name mycomponent --type lwc
400
+
401
+ Generate an Aura component bundle in the "force-app/main/default/aura" directory:
402
+
403
+ $ sf lightning generate component --name mycomponent --output-dir force-app/main/default/aura
404
+
405
+ Generate a Lightning web component bundle in the "force-app/main/default/lwc" directory:
406
+
407
+ $ sf lightning generate component --name mycomponent --type lwc --output-dir force-app/main/default/lwc
408
+
409
+ FLAG DESCRIPTIONS
410
+ -d, --output-dir=<value> Directory for saving the created files.
411
+
412
+ The location can be an absolute path or relative to the current working directory. The default is the current
413
+ directory.
414
+
415
+ -n, --name=<value> Name of the generated Lightning Component.
416
+
417
+ The name can be up to 40 characters and must start with a letter.
418
+
419
+ -t, --template=default|analyticsDashboard|analyticsDashboardWithStep Template to use for file creation.
420
+
421
+ Supplied parameter values or default values are filled into a copy of the template.
422
+ ```
423
+
424
+ _See code: [src/commands/lightning/generate/component.ts](https://github.com/salesforcecli/plugin-templates/blob/56.1.1/src/commands/lightning/generate/component.ts)_
425
+
426
+ ## `sf lightning generate event`
427
+
428
+ Generate a Lightning Event.
429
+
430
+ ```
431
+ USAGE
432
+ $ sf lightning generate event -n <value> [--json] [--flags-dir <value>] [-t DefaultLightningEvt] [-d <value>] [--api-version
433
+ <value>]
434
+
435
+ FLAGS
436
+ -d, --output-dir=<value> [default: .] Directory for saving the created files.
437
+ -n, --name=<value> (required) Name of the generated Lightning Event.
438
+ -t, --template=<option> [default: DefaultLightningEvt] Template to use for file creation.
439
+ <options: DefaultLightningEvt>
440
+ --api-version=<value> Override the api version used for api requests made by this command
441
+
442
+ GLOBAL FLAGS
443
+ --flags-dir=<value> Import flag values from a directory.
444
+ --json Format output as json.
445
+
446
+ DESCRIPTION
447
+ Generate a Lightning Event.
448
+
449
+ Generates a Lightning Event bundle in the specified directory or the current working directory. The bundle consists of
450
+ multiple files in a folder with the designated name.
451
+
452
+ ALIASES
453
+ $ sf force lightning event create
454
+
455
+ EXAMPLES
456
+ Generate the metadata files for a Lightning event bundle called "myevent" in the current directory:
457
+
458
+ $ sf lightning generate event --name myevent
459
+
460
+ Similar to previous example, but generate the files in the "force-app/main/default/aura" directory:
461
+
462
+ $ sf lightning generate event --name myevent --output-dir force-app/main/default/aura
463
+
464
+ FLAG DESCRIPTIONS
465
+ -d, --output-dir=<value> Directory for saving the created files.
466
+
467
+ The location can be an absolute path or relative to the current working directory. The default is the current
468
+ directory.
469
+
470
+ -n, --name=<value> Name of the generated Lightning Event.
471
+
472
+ The name can be up to 40 characters and must start with a letter.
473
+
474
+ -t, --template=DefaultLightningEvt Template to use for file creation.
475
+
476
+ Supplied parameter values or default values are filled into a copy of the template.
477
+ ```
478
+
479
+ _See code: [src/commands/lightning/generate/event.ts](https://github.com/salesforcecli/plugin-templates/blob/56.1.1/src/commands/lightning/generate/event.ts)_
480
+
481
+ ## `sf lightning generate interface`
482
+
483
+ Generate a Lightning Interface.
484
+
485
+ ```
486
+ USAGE
487
+ $ sf lightning generate interface -n <value> [--json] [--flags-dir <value>] [-t DefaultLightningIntf] [-d <value>]
488
+ [--api-version <value>]
489
+
490
+ FLAGS
491
+ -d, --output-dir=<value> [default: .] Directory for saving the created files.
492
+ -n, --name=<value> (required) Name of the generated Lightning Interface.
493
+ -t, --template=<option> [default: DefaultLightningIntf] Template to use for file creation.
494
+ <options: DefaultLightningIntf>
495
+ --api-version=<value> Override the api version used for api requests made by this command
496
+
497
+ GLOBAL FLAGS
498
+ --flags-dir=<value> Import flag values from a directory.
499
+ --json Format output as json.
500
+
501
+ DESCRIPTION
502
+ Generate a Lightning Interface.
503
+
504
+ Generates a Lightning Interface bundle in the specified directory or the current working directory. The bundle
505
+ consists of multiple files in a folder with the designated name.
506
+
507
+ ALIASES
508
+ $ sf force lightning interface create
509
+
510
+ EXAMPLES
511
+ Generate the metadata files for a Lightning interface bundle called "myinterface" in the current directory:
512
+
513
+ $ sf lightning generate interface --name myinterface
514
+
515
+ Similar to the previous example but generate the files in the "force-app/main/default/aura" directory:
516
+
517
+ $ sf lightning generate interface --name myinterface --output-dir force-app/main/default/aura
518
+
519
+ FLAG DESCRIPTIONS
520
+ -d, --output-dir=<value> Directory for saving the created files.
521
+
522
+ The location can be an absolute path or relative to the current working directory. The default is the current
523
+ directory.
524
+
525
+ -n, --name=<value> Name of the generated Lightning Interface.
526
+
527
+ The name can be up to 40 characters and must start with a letter.
528
+
529
+ -t, --template=DefaultLightningIntf Template to use for file creation.
530
+
531
+ Supplied parameter values or default values are filled into a copy of the template.
532
+ ```
533
+
534
+ _See code: [src/commands/lightning/generate/interface.ts](https://github.com/salesforcecli/plugin-templates/blob/56.1.1/src/commands/lightning/generate/interface.ts)_
535
+
536
+ ## `sf lightning generate test`
537
+
538
+ Generate a Lightning test.
539
+
540
+ ```
541
+ USAGE
542
+ $ sf lightning generate test -n <value> [--json] [--flags-dir <value>] [-t DefaultLightningTest] [-d <value>]
543
+ [--api-version <value>]
544
+
545
+ FLAGS
546
+ -d, --output-dir=<value> [default: .] Directory for saving the created files.
547
+ -n, --name=<value> (required) Name of the generated Lightning Test.
548
+ -t, --template=<option> [default: DefaultLightningTest] Template to use for file creation.
549
+ <options: DefaultLightningTest>
550
+ --api-version=<value> Override the api version used for api requests made by this command
551
+
552
+ GLOBAL FLAGS
553
+ --flags-dir=<value> Import flag values from a directory.
554
+ --json Format output as json.
555
+
556
+ DESCRIPTION
557
+ Generate a Lightning test.
558
+
559
+ Generates the test in the specified directory or the current working directory. The .resource file and associated
560
+ metadata file are generated.
561
+
562
+ ALIASES
563
+ $ sf force lightning test create
564
+
565
+ EXAMPLES
566
+ Generate the metadata files for the Lightning test called MyLightningTest in the current directory:
567
+
568
+ $ sf lightning generate test --name MyLightningTest
569
+
570
+ Similar to the previous example but generate the files in the "force-app/main/default/lightningTests" directory:
571
+
572
+ $ sf lightning generate test --name MyLightningTest --output-dir force-app/main/default/lightningTests
573
+
574
+ FLAG DESCRIPTIONS
575
+ -d, --output-dir=<value> Directory for saving the created files.
576
+
577
+ The location can be an absolute path or relative to the current working directory. The default is the current
578
+ directory.
579
+
580
+ -n, --name=<value> Name of the generated Lightning Test.
581
+
582
+ Name of the new Lightning test; can be up to 40 characters and must start with a letter.
583
+
584
+ -t, --template=DefaultLightningTest Template to use for file creation.
585
+
586
+ Supplied parameter values or default values are filled into a copy of the template.
587
+ ```
588
+
589
+ _See code: [src/commands/lightning/generate/test.ts](https://github.com/salesforcecli/plugin-templates/blob/56.1.1/src/commands/lightning/generate/test.ts)_
590
+
591
+ ## `sf project generate`
592
+
593
+ Generate a Salesforce DX project.
594
+
595
+ ```
596
+ USAGE
597
+ $ sf project generate -n <value> [--json] [--flags-dir <value>] [-t standard|empty|analytics] [-d <value>] [-s
598
+ <value>] [-p <value>] [-x] [--api-version <value>]
599
+
600
+ FLAGS
601
+ -d, --output-dir=<value> [default: .] Directory for saving the created files.
602
+ -n, --name=<value> (required) Name of the generated project.
603
+ -p, --default-package-dir=<value> [default: force-app] Default package directory name.
604
+ -s, --namespace=<value> Namespace associated with this project and any connected scratch orgs.
605
+ -t, --template=<option> [default: standard] Template to use for project creation.
606
+ <options: standard|empty|analytics>
607
+ -x, --manifest Generate a manifest (package.xml) for change-set based development.
608
+ --api-version=<value> Will set this version as sourceApiVersion in the sfdx-project.json file
609
+
610
+ GLOBAL FLAGS
611
+ --flags-dir=<value> Import flag values from a directory.
612
+ --json Format output as json.
613
+
614
+ DESCRIPTION
615
+ Generate a Salesforce DX project.
616
+
617
+ A Salesforce DX project has a specific structure and a configuration file (sfdx-project.json) that identifies the
618
+ directory as a Salesforce DX project. This command generates the necessary configuration files and directories to get
619
+ you started.
620
+
621
+ By default, the generated sfdx-project.json file sets the sourceApiVersion property to the default API version
622
+ currently used by Salesforce CLI. To specify a different version, set the apiVersion configuration variable. For
623
+ example: "sf config set apiVersion=57.0 --global".
624
+
625
+ ALIASES
626
+ $ sf force project create
627
+
628
+ EXAMPLES
629
+ Generate a project called "mywork":
630
+
631
+ $ sf project generate --name mywork
632
+
633
+ Similar to previous example, but generate the files in a directory called "myapp":
634
+
635
+ $ sf project generate --name mywork --default-package-dir myapp
636
+
637
+ Similar to prevoius example, but also generate a default package.xml manifest file:
638
+
639
+ $ sf project generate --name mywork --default-package-dir myapp --manifest
640
+
641
+ Generate a project with the minimum files and directories:
642
+
643
+ $ sf project generate --name mywork --template empty
644
+
645
+ FLAG DESCRIPTIONS
646
+ -d, --output-dir=<value> Directory for saving the created files.
647
+
648
+ The location can be an absolute path or relative to the current working directory. The default is the current
649
+ directory.
650
+
651
+ -n, --name=<value> Name of the generated project.
652
+
653
+ Generates a project directory with this name; any valid directory name is accepted. Also sets the "name" property in
654
+ the sfdx-project.json file to this name.
655
+
656
+ -p, --default-package-dir=<value> Default package directory name.
657
+
658
+ Metadata items such as classes and Lightning bundles are placed inside this folder.
659
+
660
+ -t, --template=standard|empty|analytics Template to use for project creation.
661
+
662
+ The template determines the sample configuration files and directories that this command generates. For example, the
663
+ empty template provides these files and directory to get you started.
664
+
665
+ - .forceignore
666
+ - config/project-scratch-def.json
667
+ - sfdx-project.json
668
+ - package.json
669
+ - force-app (basic source directory structure)
670
+
671
+ The standard template provides a complete force-app directory structure so you know where to put your source. It
672
+ also provides additional files and scripts, especially useful when using Salesforce Extensions for VS Code. For
673
+ example:
674
+
675
+ - .gitignore: Use Git for version control.
676
+ - .prettierrc and .prettierignore: Use Prettier to format your Aura components.
677
+ - .vscode/extensions.json: When launched, Visual Studio Code, prompts you to install the recommended extensions for
678
+ your project.
679
+ - .vscode/launch.json: Configures Replay Debugger.
680
+ - .vscode/settings.json: Additional configuration settings.
681
+
682
+ The analytics template provides similar files and the force-app/main/default/waveTemplates directory.
683
+
684
+ -x, --manifest Generate a manifest (package.xml) for change-set based development.
685
+
686
+ Generates a default manifest (package.xml) for fetching Apex, Visualforce, Lightning components, and static
687
+ resources.
688
+
689
+ --api-version=<value> Will set this version as sourceApiVersion in the sfdx-project.json file
690
+
691
+ Override the api version used for api requests made by this command
692
+ ```
693
+
694
+ _See code: [src/commands/project/generate.ts](https://github.com/salesforcecli/plugin-templates/blob/56.1.1/src/commands/project/generate.ts)_
695
+
696
+ ## `sf static-resource generate`
697
+
698
+ Generate a static resource.
699
+
700
+ ```
701
+ USAGE
702
+ $ sf static-resource generate -n <value> [--json] [--flags-dir <value>] [--type <value>] [-d <value>] [--api-version
703
+ <value>]
704
+
705
+ FLAGS
706
+ -d, --output-dir=<value> [default: .] Directory for saving the created files.
707
+ -n, --name=<value> (required) Name of the generated static resource.
708
+ --api-version=<value> Override the api version used for api requests made by this command
709
+ --type=<value> [default: application/zip] Content type (mime type) of the generated static resource.
710
+
711
+ GLOBAL FLAGS
712
+ --flags-dir=<value> Import flag values from a directory.
713
+ --json Format output as json.
714
+
715
+ DESCRIPTION
716
+ Generate a static resource.
717
+
718
+ Generates the metadata resource file in the specified directory or the current working directory. Static resource
719
+ files must be contained in a parent directory called "staticresources" in your package directory. Either run this
720
+ command from an existing directory of this name, or use the --output-dir flag to create one or point to an existing
721
+ one.
722
+
723
+ ALIASES
724
+ $ sf force staticresource create
725
+
726
+ EXAMPLES
727
+ Generate the metadata file for a static resource called MyResource in the current directory:
728
+
729
+ $ sf static-resource generate --name MyResource
730
+
731
+ Similar to previous example, but specifies a MIME type of application/json:
732
+
733
+ $ sf static-resource generate --name MyResource --type application/json
734
+
735
+ Generate the resource file in the "force-app/main/default/staticresources" directory:
736
+
737
+ $ sf static-resource generate --name MyResource --output-dir force-app/main/default/staticresources
738
+
739
+ FLAG DESCRIPTIONS
740
+ -d, --output-dir=<value> Directory for saving the created files.
741
+
742
+ The location can be an absolute path or relative to the current working directory. The default is the current
743
+ directory.
744
+
745
+ -n, --name=<value> Name of the generated static resource.
746
+
747
+ This name can contain only underscores and alphanumeric characters, and must be unique in your org. It must begin
748
+ with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores.
749
+
750
+ --type=<value> Content type (mime type) of the generated static resource.
751
+
752
+ Must be a valid MIME type such as application/json, application/javascript, application/zip, text/plain, text/css,
753
+ etc.
754
+ ```
755
+
756
+ _See code: [src/commands/static-resource/generate.ts](https://github.com/salesforcecli/plugin-templates/blob/56.1.1/src/commands/static-resource/generate.ts)_
757
+
758
+ ## `sf visualforce generate component`
759
+
760
+ Generate a Visualforce Component.
761
+
762
+ ```
763
+ USAGE
764
+ $ sf visualforce generate component -n <value> -l <value> [--json] [--flags-dir <value>] [-t DefaultVFComponent] [-d <value>]
765
+ [--api-version <value>]
766
+
767
+ FLAGS
768
+ -d, --output-dir=<value> [default: .] Directory for saving the created files.
769
+ -l, --label=<value> (required) Visualforce Component label.
770
+ -n, --name=<value> (required) Name of the generated Visualforce Component.
771
+ -t, --template=<option> [default: DefaultVFComponent] Template to use for file creation.
772
+ <options: DefaultVFComponent>
773
+ --api-version=<value> Override the api version used for api requests made by this command
774
+
775
+ GLOBAL FLAGS
776
+ --flags-dir=<value> Import flag values from a directory.
777
+ --json Format output as json.
778
+
779
+ DESCRIPTION
780
+ Generate a Visualforce Component.
781
+
782
+ The command generates the .Component file and associated metadata file in the specified directory or the current
783
+ working directory by default.
784
+
785
+ ALIASES
786
+ $ sf force visualforce component create
787
+
788
+ EXAMPLES
789
+ Generate the metadata files for a Visualforce component in the current directory:
790
+
791
+ $ sf visualforce generate component --name mycomponent --label mylabel
792
+
793
+ Similar to previous example, but generate the files in the directory "force-app/main/default/components":
794
+
795
+ $ sf visualforce generate component --name mycomponent --label mylabel --output-dir components
796
+
797
+ FLAG DESCRIPTIONS
798
+ -d, --output-dir=<value> Directory for saving the created files.
799
+
800
+ The location can be an absolute path or relative to the current working directory. The default is the current
801
+ directory.
802
+
803
+ -n, --name=<value> Name of the generated Visualforce Component.
804
+
805
+ The name can be up to 40 characters and must start with a letter.
806
+
807
+ -t, --template=DefaultVFComponent Template to use for file creation.
808
+
809
+ Supplied parameter values or default values are filled into a copy of the template.
810
+ ```
811
+
812
+ _See code: [src/commands/visualforce/generate/component.ts](https://github.com/salesforcecli/plugin-templates/blob/56.1.1/src/commands/visualforce/generate/component.ts)_
813
+
814
+ ## `sf visualforce generate page`
815
+
816
+ Generate a Visualforce Page.
817
+
818
+ ```
819
+ USAGE
820
+ $ sf visualforce generate page -n <value> -l <value> [--json] [--flags-dir <value>] [-d <value>] [--api-version
821
+ <value>]
822
+
823
+ FLAGS
824
+ -d, --output-dir=<value> [default: .] Directory for saving the created files.
825
+ -l, --label=<value> (required) Visualforce Page label.
826
+ -n, --name=<value> (required) Name of the generated Visualforce Page.
827
+ --api-version=<value> Override the api version used for api requests made by this command
828
+
829
+ GLOBAL FLAGS
830
+ --flags-dir=<value> Import flag values from a directory.
831
+ --json Format output as json.
832
+
833
+ DESCRIPTION
834
+ Generate a Visualforce Page.
835
+
836
+ The command generates the .Page file and associated metadata file in the specified directory or the current working
837
+ directory by default.
838
+
839
+ ALIASES
840
+ $ sf force visualforce page create
841
+
842
+ EXAMPLES
843
+ Generate the metadata files for a Visualforce page in the current directory:
844
+
845
+ $ sf visualforce generate page --name mypage --label mylabel
846
+
847
+ Similar to previous example, but generate the files in the directory "force-app/main/default/pages":
848
+
849
+ $ sf visualforce generate page --name mypage --label mylabel --output-dir pages
850
+
851
+ FLAG DESCRIPTIONS
852
+ -d, --output-dir=<value> Directory for saving the created files.
853
+
854
+ The location can be an absolute path or relative to the current working directory. The default is the current
855
+ directory.
856
+
857
+ -n, --name=<value> Name of the generated Visualforce Page.
858
+
859
+ The name can be up to 40 characters and must start with a letter.
860
+ ```
861
+
862
+ _See code: [src/commands/visualforce/generate/page.ts](https://github.com/salesforcecli/plugin-templates/blob/56.1.1/src/commands/visualforce/generate/page.ts)_
129
863
 
130
864
  <!-- commandsstop -->