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