@salesforce/plugin-templates 56.0.4 → 56.0.5

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
@@ -116,396 +116,730 @@ Congrats, you are debugging!
116
116
 
117
117
  # Commands
118
118
 
119
- A list of the available commands
119
+ <!-- commands -->
120
120
 
121
- #### `sfdx force:apex:class:create`
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)
122
133
 
123
- create an Apex class
134
+ ## `sf analytics generate template`
135
+
136
+ Generate a simple Analytics template.
124
137
 
125
138
  ```
126
139
  USAGE
127
- $ sfdx force:apex:class:create -n <string> [-d <string>] [-t <string>] [--apiversion <string>] [--json] [--loglevel
128
- trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
140
+ $ sf analytics generate template -n <value> [--json] [-d <value>] [--api-version <value>]
129
141
 
130
- OPTIONS
131
- -d, --outputdir=outputdir folder for saving the created files
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
132
146
 
133
- -n, --classname=classname(required) name of the generated Apex class
147
+ GLOBAL FLAGS
148
+ --json Format output as json.
134
149
 
135
- -t, --template=ApexException|ApexUnitTest|DefaultApexClass|InboundEmailService [default: DefaultApexClass] template
136
- to use for file creation
150
+ DESCRIPTION
151
+ Generate a simple Analytics template.
137
152
 
138
- --apiversion=apiversion override the api version used for
139
- api requests made by this command
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.
140
156
 
141
- --json format output as json
157
+ ALIASES
158
+ $ sf force analytics template create
142
159
 
143
- --loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for
144
- this command invocation
160
+ EXAMPLES
161
+ Generate the metadata files for a simple Analytics template file called myTemplate in the
162
+ force-app/main/default/waveTemplates directory:
145
163
 
146
- DESCRIPTION
147
- If not supplied, the apiversion, template, and outputdir use default values.
148
- The outputdir can be an absolute path or relative to the current working directory.
164
+ $ sf analytics generate template --name myTemplate --output-dir force-app/main/default/waveTemplates
149
165
 
150
- EXAMPLES
151
- $ sfdx force:apex:class:create -n MyClass
152
- $ sfdx force:apex:class:create -n MyClass -d classes
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.
153
171
  ```
154
172
 
155
- _See code: [src/commands/force/apex/class/create.ts](https://github.com/salesforcecli/plugin-templates/blob/master/src/commands/force/apex/class/create.ts)_
173
+ _See code: [src/commands/analytics/generate/template.ts](https://github.com/salesforcecli/plugin-templates/blob/56.0.5/src/commands/analytics/generate/template.ts)_
156
174
 
157
- #### `sfdx force:apex:trigger:create`
175
+ ## `sf apex generate class`
158
176
 
159
- create an Apex trigger
177
+ Generate an Apex class.
160
178
 
161
179
  ```
162
180
  USAGE
163
- $ sfdx force:apex:trigger:create -n <string> [-d <string>] [-e <string>] [-s <string>] [-t <string>] [--apiversion
164
- <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
181
+ $ sf apex generate class -n <value> [--json] [-t ApexException|ApexUnitTest|DefaultApexClass|InboundEmailService] [-d
182
+ <value>] [--api-version <value>]
165
183
 
166
- OPTIONS
167
- -d, --outputdir=outputdir folder for saving the created files
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
168
190
 
169
- -e, --triggerevents=before insert|before update|before delete|after insert|after update|after delete|after undelete
170
- [default: before insert] events that fire the trigger
191
+ GLOBAL FLAGS
192
+ --json Format output as json.
171
193
 
172
- -n, --triggername=triggername (required) name of the generated Apex trigger
194
+ DESCRIPTION
195
+ Generate an Apex class.
173
196
 
174
- -s, --sobject=sobject [default: SOBJECT] sObject to create a trigger on
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.
175
200
 
176
- -t, --template=ApexTrigger [default: ApexTrigger] template to use for file creation
201
+ ALIASES
202
+ $ sf force apex class create
177
203
 
178
- --apiversion=apiversion override the api version used for api requests made by this command
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:
179
207
 
180
- --json format output as json
208
+ $ sf apex generate class --name MyClass
181
209
 
182
- --loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for this command invocation
210
+ Similar to previous example, but generates the files in the "force-app/main/default/classes" directory:
183
211
 
184
- DESCRIPTION
185
- If not supplied, the apiversion, template, and outputdir use default values.
186
- The outputdir can be an absolute path or relative to the current working directory.
212
+ $ sf apex generate class --name MyClass --output-dir force-app/main/default/classes
187
213
 
188
- EXAMPLES
189
- $ sfdx force:apex:trigger:create -n MyTrigger
190
- $ sfdx force:apex:trigger:create -n MyTrigger -s Account -e 'before insert, after upsert'
191
- $ sfdx force:apex:trigger:create -n MyTrigger -d triggers
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.
192
227
  ```
193
228
 
194
- _See code: [src/commands/force/apex/trigger/create.ts](https://github.com/salesforcecli/plugin-templates/blob/master/src/commands/force/apex/trigger/create.ts)_
229
+ _See code: [src/commands/apex/generate/class.ts](https://github.com/salesforcecli/plugin-templates/blob/56.0.5/src/commands/apex/generate/class.ts)_
195
230
 
196
- #### `sfdx force:lightning:app:create`
231
+ ## `sf apex generate trigger`
197
232
 
198
- create a Lightning app
233
+ Generate an Apex trigger.
199
234
 
200
235
  ```
201
236
  USAGE
202
- $ sfdx force:lightning:app:create -n <string> [-d <string>] [-t <string>] [--apiversion <string>] [--json] [--loglevel
203
- trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
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.
204
253
 
205
- OPTIONS
206
- -d, --outputdir=outputdir folder for saving the created files
254
+ DESCRIPTION
255
+ Generate an Apex trigger.
207
256
 
208
- -n, --appname=appname (required) name of the generated
209
- Lightning app
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.
210
260
 
211
- -t, --template=DefaultLightningApp [default: DefaultLightningApp]
212
- template to use for file creation
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.
213
263
 
214
- --apiversion=apiversion override the api version used for
215
- api requests made by this command
264
+ ALIASES
265
+ $ sf force apex trigger create
216
266
 
217
- --json format output as json
267
+ EXAMPLES
268
+ Generate two files associated with the MyTrigger Apex trigger (MyTrigger.trigger and MyTrigger.trigger-meta.xml) in
269
+ the current directory:
218
270
 
219
- --loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for
220
- this command invocation
271
+ $ sf apex generate trigger --name MyTrigger
221
272
 
222
- DESCRIPTION
223
- If not supplied, the apiversion, template, and outputdir use default values.
224
- The outputdir can be an absolute path or relative to the current working directory.
225
- If you don’t specify an outputdir, we create a subfolder in your current working directory with the name of your
226
- bundle. For example, if the current working directory is force-app and your Lightning bundle is called myBundle, we
227
- create force-app/myBundle/ to store the files in the bundle.
273
+ Similar to the previous example, but generate the files in the "force-app/main/default/triggers" directory:
228
274
 
229
- EXAMPLES
230
- $ sfdx force:lightning:app:create -n myapp
231
- $ sfdx force:lightning:app:create -n myapp -d aura
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.
232
294
  ```
233
295
 
234
- _See code: [src/commands/force/lightning/app/create.ts](https://github.com/salesforcecli/plugin-templates/blob/master/src/commands/force/lightning/app/create.ts)_
296
+ _See code: [src/commands/apex/generate/trigger.ts](https://github.com/salesforcecli/plugin-templates/blob/56.0.5/src/commands/apex/generate/trigger.ts)_
235
297
 
236
- #### `sfdx force:lightning:component:create`
298
+ ## `sf lightning generate app`
237
299
 
238
- create a bundle for an Aura component or a Lightning web component
300
+ Generate a Lightning App.
239
301
 
240
302
  ```
241
303
  USAGE
242
- $ sfdx force:lightning:component:create -n <string> [-d <string>] [-t <string>] [--type <string>] [--apiversion
243
- <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
304
+ $ sf lightning generate app -n <value> [--json] [-t DefaultLightningApp] [-d <value>] [--api-version <value>]
244
305
 
245
- OPTIONS
246
- -d, --outputdir=outputdir folder for saving the created files
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
247
312
 
248
- -n, --componentname=componentname (required) name of the generated
249
- Lightning component
313
+ GLOBAL FLAGS
314
+ --json Format output as json.
250
315
 
251
- -t, --template= [default: DefaultLightningCmp]
252
- template to use for file creation
316
+ DESCRIPTION
317
+ Generate a Lightning App.
253
318
 
254
- --apiversion=apiversion override the api version used for
255
- api requests made by this command
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.
256
321
 
257
- --json format output as json
322
+ ALIASES
323
+ $ sf force lightning app create
258
324
 
259
- --loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for
260
- this command invocation
325
+ EXAMPLES
326
+ Generate the metadata files for a Lightning app bundle called "myapp" in the current directory:
261
327
 
262
- --type=aura|lwc [default: aura] type of the
263
- Lightning component
328
+ $ sf lightning generate app --name myapp
264
329
 
265
- DESCRIPTION
266
- If not supplied, the apiversion, template, and outputdir use default values.
267
- The outputdir can be an absolute path or relative to the current working directory.
268
- If you don’t specify an outputdir, we create a subfolder in your current working directory with the name of your
269
- bundle. For example, if the current working directory is force-app and your Lightning bundle is called myBundle, we
270
- create force-app/myBundle/ to store the files in the bundle.
271
- To create a Lightning web component, pass --type lwc to the command. If you don’t include a --type value, Salesforce
272
- CLI creates an Aura component by default.
330
+ Similar to the previous example, but generate the files in the "force-app/main/default/aura" directory:
273
331
 
274
- EXAMPLES
275
- $ sfdx force:lightning:component:create -n mycomponent
276
- $ sfdx force:lightning:component:create -n mycomponent --type lwc
277
- $ sfdx force:lightning:component:create -n mycomponent -d aura
278
- $ sfdx force:lightning:component:create -n mycomponent --type lwc -d lwc
279
- ```
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.
280
336
 
281
- _See code: [src/commands/force/lightning/component/create.ts](https://github.com/salesforcecli/plugin-templates/blob/master/src/commands/force/lightning/component/create.ts)_
337
+ The location can be an absolute path or relative to the current working directory. The default is the current
338
+ directory.
282
339
 
283
- #### `sfdx force:lightning:event:create`
340
+ -n, --name=<value> Name of the generated Lightning App.
284
341
 
285
- create a Lightning event
342
+ The name can be up to 40 characters and must start with a letter.
286
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.
287
347
  ```
288
- USAGE
289
- $ sfdx force:lightning:event:create -n <string> [-d <string>] [-t <string>] [--apiversion <string>] [--json]
290
- [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
291
348
 
292
- OPTIONS
293
- -d, --outputdir=outputdir folder for saving the created files
349
+ _See code: [src/commands/lightning/generate/app.ts](https://github.com/salesforcecli/plugin-templates/blob/56.0.5/src/commands/lightning/generate/app.ts)_
294
350
 
295
- -n, --eventname=eventname (required) name of the generated
296
- Lightning event
351
+ ## `sf lightning generate component`
297
352
 
298
- -t, --template=DefaultLightningEvt [default: DefaultLightningEvt]
299
- template to use for file creation
353
+ Generate a bundle for an Aura component or a Lightning web component.
300
354
 
301
- --apiversion=apiversion override the api version used for
302
- api requests made by this command
355
+ ```
356
+ USAGE
357
+ $ sf lightning generate component -n <value> [--json] [-t default|analyticsDashboard|analyticsDashboardWithStep] [-d <value>]
358
+ [--api-version <value>] [--type aura|lwc]
303
359
 
304
- --json format output as json
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>
305
368
 
306
- --loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for
307
- this command invocation
369
+ GLOBAL FLAGS
370
+ --json Format output as json.
308
371
 
309
372
  DESCRIPTION
310
- If not supplied, the apiversion, template, and outputdir use default values.
311
- The outputdir can be an absolute path or relative to the current working directory.
312
- If you don’t specify an outputdir, we create a subfolder in your current working directory with the name of your
313
- bundle. For example, if the current working directory is force-app and your Lightning bundle is called myBundle, we
314
- create force-app/myBundle/ to store the files in the bundle.
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
315
384
 
316
385
  EXAMPLES
317
- $ sfdx force:lightning:app:create -n myevent
318
- $ sfdx force:lightning:event:create -n myevent -d aura
319
- ```
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.
320
407
 
321
- _See code: [src/commands/force/lightning/event/create.ts](https://github.com/salesforcecli/plugin-templates/blob/master/src/commands/force/lightning/event/create.ts)_
408
+ -n, --name=<value> Name of the generated Lightning Component.
322
409
 
323
- #### `sfdx force:lightning:interface:create`
410
+ The name can be up to 40 characters and must start with a letter.
324
411
 
325
- create a Lightning interface
412
+ -t, --template=default|analyticsDashboard|analyticsDashboardWithStep Template to use for file creation.
326
413
 
414
+ Supplied parameter values or default values are filled into a copy of the template.
327
415
  ```
328
- USAGE
329
- $ sfdx force:lightning:interface:create -n <string> [-d <string>] [-t <string>] [--apiversion <string>] [--json]
330
- [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
331
416
 
332
- OPTIONS
333
- -d, --outputdir=outputdir folder for saving the created files
417
+ _See code: [src/commands/lightning/generate/component.ts](https://github.com/salesforcecli/plugin-templates/blob/56.0.5/src/commands/lightning/generate/component.ts)_
334
418
 
335
- -n, --interfacename=interfacename (required) name of the generated
336
- Lightning interface
419
+ ## `sf lightning generate event`
337
420
 
338
- -t, --template=DefaultLightningIntf [default: DefaultLightningIntf]
339
- template to use for file creation
421
+ Generate a Lightning Event.
340
422
 
341
- --apiversion=apiversion override the api version used for
342
- api requests made by this command
423
+ ```
424
+ USAGE
425
+ $ sf lightning generate event -n <value> [--json] [-t DefaultLightningEvt] [-d <value>] [--api-version <value>]
343
426
 
344
- --json format output as json
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
345
433
 
346
- --loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for
347
- this command invocation
434
+ GLOBAL FLAGS
435
+ --json Format output as json.
348
436
 
349
437
  DESCRIPTION
350
- If not supplied, the apiversion, template, and outputdir use default values.
351
- The outputdir can be an absolute path or relative to the current working directory.
352
- If you don’t specify an outputdir, we create a subfolder in your current working directory with the name of your
353
- bundle. For example, if the current working directory is force-app and your Lightning bundle is called myBundle, we
354
- create force-app/myBundle/ to store the files in the bundle.
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
355
445
 
356
446
  EXAMPLES
357
- $ sfdx force:lightning:interface:create -n myinterface
358
- $ sfdx force:lightning:interface:create -n myinterface -d aura
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.
359
468
  ```
360
469
 
361
- _See code: [src/commands/force/lightning/interface/create.ts](https://github.com/salesforcecli/plugin-templates/blob/master/src/commands/force/lightning/interface/create.ts)_
470
+ _See code: [src/commands/lightning/generate/event.ts](https://github.com/salesforcecli/plugin-templates/blob/56.0.5/src/commands/lightning/generate/event.ts)_
362
471
 
363
- #### `sfdx force:lightning:test:create`
472
+ ## `sf lightning generate interface`
364
473
 
365
- create a Lightning test
474
+ Generate a Lightning Interface.
366
475
 
367
476
  ```
368
477
  USAGE
369
- $ sfdx force:lightning:test:create -n <string> [-d <string>] [-t <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
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
370
486
 
371
- OPTIONS
372
- -d, --outputdir=outputdir folder for saving the created files
373
- -n, --testname=testname (required) name of the generated Lightning test
374
- -t, --template=DefaultLightningTest [default: DefaultLightningTest] template to use for file creation
375
- --json format output as json
376
- --loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for this command invocation
487
+ GLOBAL FLAGS
488
+ --json Format output as json.
377
489
 
378
490
  DESCRIPTION
379
- The outputdir can be an absolute path or relative to the current working directory.
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
380
498
 
381
499
  EXAMPLES
382
- $ sfdx force:lightning:test:create -n MyLightningTest
383
- $ sfdx force:lightning:test:create -n MyLightningTest -d lightningTests
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.
384
521
  ```
385
522
 
386
- _See code: [src/commands/force/lightning/test/create.ts](https://github.com/salesforcecli/plugin-templates/blob/master/src/commands/force/lightning/test/create.ts)_
523
+ _See code: [src/commands/lightning/generate/interface.ts](https://github.com/salesforcecli/plugin-templates/blob/56.0.5/src/commands/lightning/generate/interface.ts)_
387
524
 
388
- #### `sfdx force:project:create`
525
+ ## `sf lightning generate test`
389
526
 
390
- create a Salesforce DX project
527
+ Generate a Lightning test.
391
528
 
392
529
  ```
393
530
  USAGE
394
- $ sfdx force:project:create -n <string> [-d <string>] [-p <string>] [-s <string>] [-t <string>] [-x] [--json]
395
- [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
531
+ $ sf lightning generate test -n <value> [--json] [-t DefaultLightningTest] [-d <value>] [--api-version <value>]
396
532
 
397
- OPTIONS
398
- -d, --outputdir=outputdir folder for saving the created files
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
399
539
 
400
- -n, --projectname=projectname (required) name of the generated
401
- project
540
+ GLOBAL FLAGS
541
+ --json Format output as json.
402
542
 
403
- -p, --defaultpackagedir=defaultpackagedir [default: force-app] default package
404
- directory name
543
+ DESCRIPTION
544
+ Generate a Lightning test.
405
545
 
406
- -s, --namespace=namespace project associated namespace
546
+ Generates the test in the specified directory or the current working directory. The .resource file and associated
547
+ metadata file are generated.
407
548
 
408
- -t, --template=standard|empty|analytics [default: standard] template to use
409
- for file creation
549
+ ALIASES
550
+ $ sf force lightning test create
410
551
 
411
- -x, --manifest generate a manifest (package.xml)
412
- for change-set based development
552
+ EXAMPLES
553
+ Generate the metadata files for the Lightning test called MyLightningTest in the current directory:
413
554
 
414
- --json format output as json
555
+ $ sf lightning generate test --name MyLightningTest
415
556
 
416
- --loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for
417
- this command invocation
557
+ Similar to the previous example but generate the files in the "force-app/main/default/lightningTests" directory:
418
558
 
419
- DESCRIPTION
420
- Default values are used if the template, namespace, defaultpackagedir, and outputdir aren’t supplied.
421
- The outputdir can be an absolute path or relative to the current working directory.
559
+ $ sf lightning generate test --name MyLightningTest --output-dir force-app/main/default/lightningTests
422
560
 
423
- EXAMPLES
424
- $ sfdx force:project:create --projectname mywork
425
- $ sfdx force:project:create --projectname mywork --defaultpackagedir myapp
426
- $ sfdx force:project:create --projectname mywork --defaultpackagedir myapp --manifest
427
- $ sfdx force:project:create --projectname mywork --template empty
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.
428
574
  ```
429
575
 
430
- _See code: [src/commands/force/project/create.ts](https://github.com/salesforcecli/plugin-templates/blob/master/src/commands/force/project/create.ts)_
576
+ _See code: [src/commands/lightning/generate/test.ts](https://github.com/salesforcecli/plugin-templates/blob/56.0.5/src/commands/lightning/generate/test.ts)_
431
577
 
432
- #### `sfdx force:visualforce:component:create`
578
+ ## `sf project generate`
433
579
 
434
- create a Visualforce component
580
+ Generate a Salesforce DX project.
435
581
 
436
582
  ```
437
583
  USAGE
438
- $ sfdx force:visualforce:component:create -n <string> -l <string> [-d <string>] [-t <string>] [--apiversion <string>]
439
- [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
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.
440
633
 
441
- OPTIONS
442
- -d, --outputdir=outputdir folder for saving the created files
634
+ The location can be an absolute path or relative to the current working directory. The default is the current
635
+ directory.
443
636
 
444
- -l, --label=label (required) Visualforce component
445
- label
637
+ -n, --name=<value> Name of the generated project.
446
638
 
447
- -n, --componentname=componentname (required) name of the generated
448
- Visualforce component
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.
449
641
 
450
- -t, --template=DefaultVFComponent [default: DefaultVFComponent]
451
- template to use for file creation
642
+ -p, --default-package-dir=<value> Default package directory name.
452
643
 
453
- --apiversion=apiversion override the api version used for
454
- api requests made by this command
644
+ Metadata items such as classes and Lightning bundles are placed inside this folder.
455
645
 
456
- --json format output as json
646
+ -t, --template=standard|empty|analytics Template to use for project creation.
457
647
 
458
- --loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for
459
- this command invocation
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.5/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.
460
698
 
461
699
  DESCRIPTION
462
- If not supplied, the apiversion, template, and outputdir use default values.
463
- The outputdir can be an absolute path or relative to the current working directory.
464
- Name and label are required.
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
465
709
 
466
710
  EXAMPLES
467
- $ sfdx force:visualforce:component:create -n mycomponent -l mylabel
468
- $ sfdx force:visualforce:component:create -n mycomponent -l mylabel -d components
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.
469
738
  ```
470
739
 
471
- _See code: [src/commands/force/visualforce/component/create.ts](https://github.com/salesforcecli/plugin-templates/blob/master/src/commands/force/visualforce/component/create.ts)_
740
+ _See code: [src/commands/static-resource/generate.ts](https://github.com/salesforcecli/plugin-templates/blob/56.0.5/src/commands/static-resource/generate.ts)_
472
741
 
473
- #### `sfdx force:visualforce:page:create`
742
+ ## `sf visualforce generate component`
474
743
 
475
- create a Visualforce page
744
+ Generate a Visualforce Component.
476
745
 
477
746
  ```
478
747
  USAGE
479
- $ sfdx force:visualforce:page:create -n <string> -l <string> [-d <string>] [-t <string>] [--apiversion <string>]
480
- [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
748
+ $ sf visualforce generate component -n <value> -l <value> [--json] [-t DefaultVFComponent] [-d <value>] [--api-version
749
+ <value>]
481
750
 
482
- OPTIONS
483
- -d, --outputdir=outputdir folder for saving the created files
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
484
758
 
485
- -l, --label=label (required) Visualforce page label
759
+ GLOBAL FLAGS
760
+ --json Format output as json.
486
761
 
487
- -n, --pagename=pagename (required) name of the generated
488
- Visualforce page
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:
489
773
 
490
- -t, --template=DefaultVFPage [default: DefaultVFPage] template to
491
- use for file creation
774
+ $ sf visualforce generate component --name mycomponent --label mylabel
492
775
 
493
- --apiversion=apiversion override the api version used for
494
- api requests made by this command
776
+ Similar to previous example, but generate the files in the directory "force-app/main/default/components":
495
777
 
496
- --json format output as json
778
+ $ sf visualforce generate component --name mycomponent --label mylabel --output-dir components
497
779
 
498
- --loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for
499
- this command invocation
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.5/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.
500
813
 
501
814
  DESCRIPTION
502
- If not supplied, the apiversion, template, and outputdir use default values.
503
- If not supplied, the apiversion, template, and outputdir use default values.
504
- Name and label are required.
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
505
822
 
506
823
  EXAMPLES
507
- $ sfdx force:visualforce:page:create -n mypage -l mylabel
508
- $ sfdx force:visualforce:page:create -n mypage -l mylabel -d pages
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.
509
841
  ```
510
842
 
511
- _See code: [src/commands/force/visualforce/page/create.ts](https://github.com/salesforcecli/plugin-templates/blob/master/src/commands/force/visualforce/page/create.ts)_
843
+ _See code: [src/commands/visualforce/generate/page.ts](https://github.com/salesforcecli/plugin-templates/blob/56.0.5/src/commands/visualforce/generate/page.ts)_
844
+
845
+ <!-- commandsstop -->