lightning Commands (Deprecated)
force:lightning:app:create (Deprecated)
Help for force:lightning:app:create
If not supplied, the apiversion, template, and outputdir use default values.
The outputdir can be an absolute path or relative to the current working directory.
If you don’t specify an outputdir, we create a subfolder in your current working directory with the name of your bundle. For example, if the current working directory is force-app and your Lightning bundle is called myBundle, we create force-app/myBundle/ to store the files in the bundle.
Examples:
1sfdx force:lightning:app:create -n myapp1sfdx force:lightning:app:create -n myapp -d auraCommand Syntax
- sfdx force:lightning:app:create
- [--json]
- [--loglevel LOGLEVEL]
- -n APPNAME
- [-t TEMPLATE]
- [-d OUTPUTDIR]
- [--apiversion APIVERSION]
Parameters
- --json
- Optional
-
Format output as JSON.
- Type: boolean
- --loglevel LOGLEVEL
- Optional
-
The logging level for this command invocation. Logs are stored in $HOME/.sf/sf.log.
- Type: enum
- Permissible values are: trace, debug, info, warn, error, fatal, TRACE, DEBUG, INFO, WARN, ERROR, FATAL
- Default value: warn
- -n | --appname APPNAME
- Required
-
The Lightning app name. The name can be up to 40 characters and must start with a letter.
- Type: string
- -t | --template TEMPLATE
- Optional
-
The template to use to create the file. Supplied parameter values or default values are filled into a copy of the template.
- Type: string
- Permissible values are: DefaultLightningApp
- Default value: DefaultLightningApp
- -d | --outputdir OUTPUTDIR
- Optional
-
The directory to store the newly created files. The location can be an absolute path or relative to the current working directory. The default is the current directory.
- Type: string
- Default value: .
- --apiversion APIVERSION
- Optional
-
Override the API version used for API requests made by this command.
- Type: string
force:lightning:component:create (Deprecated)
Help for force:lightning:component:create
If not supplied, the apiversion, template, and outputdir use default values.
The outputdir can be an absolute path or relative to the current working directory.
If you don’t specify an outputdir, we create a subfolder in your current working directory with the name of your bundle. For example, if the current working directory is force-app and your Lightning bundle is called myBundle, we create force-app/myBundle/ to store the files in the bundle.
To create a Lightning web component, pass --type lwc to the command. If you don’t include a --type value, Salesforce CLI creates an Aura component by default.
Examples:
1sfdx force:lightning:component:create -n mycomponent1sfdx force:lightning:component:create -n mycomponent --type lwc1sfdx force:lightning:component:create -n mycomponent -d aura1sfdx force:lightning:component:create -n mycomponent --type lwc -d lwcCommand Syntax
- sfdx force:lightning:component:create
- [--json]
- [--loglevel LOGLEVEL]
- -n COMPONENTNAME
- [-t TEMPLATE]
- [-d OUTPUTDIR]
- [--apiversion APIVERSION]
- [--type TYPE]
Parameters
- --json
- Optional
-
Format output as JSON.
- Type: boolean
- --loglevel LOGLEVEL
- Optional
-
The logging level for this command invocation. Logs are stored in $HOME/.sf/sf.log.
- Type: enum
- Permissible values are: trace, debug, info, warn, error, fatal, TRACE, DEBUG, INFO, WARN, ERROR, FATAL
- Default value: warn
- -n | --componentname COMPONENTNAME
- Required
-
The Lightning component name. The name can be up to 40 characters and must start with a letter.
- Type: string
- -t | --template TEMPLATE
- Optional
-
The template to use to create the file. Supplied parameter values or default values are filled into a copy of the template.
- Type: string
- Permissible values are: default, analyticsDashboard, analyticsDashboardWithStep
- Default value: default
- -d | --outputdir OUTPUTDIR
- Optional
-
The directory to store the newly created files. The location can be an absolute path or relative to the current working directory. The default is the current directory.
- Type: string
- Default value: .
- --apiversion APIVERSION
- Optional
-
Override the API version used for API requests made by this command.
- Type: string
- --type TYPE
- Optional
-
The type of the new Lightning component.
- Type: string
- Permissible values are: aura, lwc
- Default value: aura
force:lightning:event:create (Deprecated)
Help for force:lightning:event:create
If not supplied, the apiversion, template, and outputdir use default values.
The outputdir can be an absolute path or relative to the current working directory.
If you don’t specify an outputdir, we create a subfolder in your current working directory with the name of your bundle. For example, if the current working directory is force-app and your Lightning bundle is called myBundle, we create force-app/myBundle/ to store the files in the bundle.
Examples:
1sfdx force:lightning:event:create -n myevent1sfdx force:lightning:event:create -n myevent -d auraCommand Syntax
- sfdx force:lightning:event:create
- [--json]
- [--loglevel LOGLEVEL]
- -n EVENTNAME
- [-t TEMPLATE]
- [-d OUTPUTDIR]
- [--apiversion APIVERSION]
Parameters
- --json
- Optional
-
Format output as JSON.
- Type: boolean
- --loglevel LOGLEVEL
- Optional
-
The logging level for this command invocation. Logs are stored in $HOME/.sf/sf.log.
- Type: enum
- Permissible values are: trace, debug, info, warn, error, fatal, TRACE, DEBUG, INFO, WARN, ERROR, FATAL
- Default value: warn
- -n | --eventname EVENTNAME
- Required
-
The Lightning event name. The name can be up to 40 characters and must start with a letter.
- Type: string
- -t | --template TEMPLATE
- Optional
-
The template to use to create the file. Supplied parameter values or default values are filled into a copy of the template.
- Type: string
- Permissible values are: DefaultLightningEvt
- Default value: DefaultLightningEvt
- -d | --outputdir OUTPUTDIR
- Optional
-
The directory to store the newly created files. The location can be an absolute path or relative to the current working directory. The default is the current directory.
- Type: string
- Default value: .
- --apiversion APIVERSION
- Optional
-
Override the API version used for API requests made by this command.
- Type: string
force:lightning:interface:create (Deprecated)
Help for force:lightning:interface:create
If not supplied, the apiversion, template, and outputdir use default values.
The outputdir can be an absolute path or relative to the current working directory.
If you don’t specify an outputdir, we create a subfolder in your current working directory with the name of your bundle. For example, if the current working directory is force-app and your Lightning bundle is called myBundle, we create force-app/myBundle/ to store the files in the bundle.
Examples:
1sfdx force:lightning:interface:create -n myinterface1sfdx force:lightning:interface:create -n myinterface -d auraCommand Syntax
- sfdx force:lightning:interface:create
- [--json]
- [--loglevel LOGLEVEL]
- -n INTERFACENAME
- [-t TEMPLATE]
- [-d OUTPUTDIR]
- [--apiversion APIVERSION]
Parameters
- --json
- Optional
-
Format output as JSON.
- Type: boolean
- --loglevel LOGLEVEL
- Optional
-
The logging level for this command invocation. Logs are stored in $HOME/.sf/sf.log.
- Type: enum
- Permissible values are: trace, debug, info, warn, error, fatal, TRACE, DEBUG, INFO, WARN, ERROR, FATAL
- Default value: warn
- -n | --interfacename INTERFACENAME
- Required
-
The Lightning interface name. The name can be up to 40 characters and must start with a letter.
- Type: string
- -t | --template TEMPLATE
- Optional
-
The template to use to create the file. Supplied parameter values or default values are filled into a copy of the template.
- Type: string
- Permissible values are: DefaultLightningIntf
- Default value: DefaultLightningIntf
- -d | --outputdir OUTPUTDIR
- Optional
-
The directory to store the newly created files. The location can be an absolute path or relative to the current working directory. The default is the current directory.
- Type: string
- Default value: .
- --apiversion APIVERSION
- Optional
-
Override the API version used for API requests made by this command.
- Type: string
force:lightning:lwc:test:create (Deprecated)
Examples for force:lightning:lwc:test:create
1sfdx force:lightning:lwc:test:create -f force-app/main/default/lwc/myButton/myButton.jsCommand Syntax
- sfdx force:lightning:lwc:test:create
- [--json]
- [--loglevel LOGLEVEL]
- -f FILEPATH
Parameters
- --json
- Optional
-
Format output as JSON.
- Type: boolean
- --loglevel LOGLEVEL
- Optional
-
The logging level for this command invocation. Logs are stored in $HOME/.sf/sf.log.
- Type: enum
- Permissible values are: trace, debug, info, warn, error, fatal, TRACE, DEBUG, INFO, WARN, ERROR, FATAL
- Default value: warn
- -f | --filepath FILEPATH
- Required
-
Path to Lightning web component .js file to create a test for.
- Type: string
force:lightning:lwc:test:run (Deprecated)
Examples for force:lightning:lwc:test:run
1sfdx force:lightning:lwc:test:run1sfdx force:lightning:lwc:test:run -wCommand Syntax
- sfdx force:lightning:lwc:test:run
- [--json]
- [--loglevel LOGLEVEL]
- [-d]
- [--watch]
Parameters
- --json
- Optional
-
Format output as JSON.
- Type: boolean
- --loglevel LOGLEVEL
- Optional
-
The logging level for this command invocation. Logs are stored in $HOME/.sf/sf.log.
- Type: enum
- Permissible values are: trace, debug, info, warn, error, fatal, TRACE, DEBUG, INFO, WARN, ERROR, FATAL
- Default value: warn
- -d | --debug
- Optional
-
Runs tests in a Node process that an external debugger can connect to. The run pauses until the debugger is connected. For more information, see: https://jestjs.io/docs/en/troubleshooting
- Type: boolean
- --watch
- Optional
-
Runs tests when a watched file changes. Watched files include the component under test and any files it references.
- Type: boolean
force:lightning:lwc:test:setup (Deprecated)
Examples for force:lightning:lwc:test:setup
1sfdx force:lightning:lwc:test:setupCommand Syntax
- sfdx force:lightning:lwc:test:setup
- [--json]
- [--loglevel LOGLEVEL]
Parameters
- --json
- Optional
-
Format output as JSON.
- Type: boolean
- --loglevel LOGLEVEL
- Optional
-
The logging level for this command invocation. Logs are stored in $HOME/.sf/sf.log.
- Type: enum
- Permissible values are: trace, debug, info, warn, error, fatal, TRACE, DEBUG, INFO, WARN, ERROR, FATAL
- Default value: warn
force:lightning:test:create (Deprecated)
Help for force:lightning:test:create
If not supplied, the apiversion, template, and outputdir use default values.
The outputdir can be an absolute path or relative to the current working directory.
Examples:
1sfdx force:lightning:test:create -n MyLightningTest1sfdx force:lightning:test:create -n MyLightningTest -d lightningTestsCommand Syntax
- sfdx force:lightning:test:create
- [--json]
- [--loglevel LOGLEVEL]
- -n TESTNAME
- [-t TEMPLATE]
- [-d OUTPUTDIR]
Parameters
- --json
- Optional
-
Format output as JSON.
- Type: boolean
- --loglevel LOGLEVEL
- Optional
-
The logging level for this command invocation. Logs are stored in $HOME/.sf/sf.log.
- Type: enum
- Permissible values are: trace, debug, info, warn, error, fatal, TRACE, DEBUG, INFO, WARN, ERROR, FATAL
- Default value: warn
- -n | --testname TESTNAME
- Required
-
The name of the new Lightning test. The name can be up to 40 characters and must start with a letter.
- Type: string
- -t | --template TEMPLATE
- Optional
-
The template to use to create the file. Supplied parameter values or default values are filled into a copy of the template.
- Type: string
- Permissible values are: DefaultLightningTest
- Default value: DefaultLightningTest
- -d | --outputdir OUTPUTDIR
- Optional
-
The directory to store the newly created files. The location can be an absolute path or relative to the current working directory. The default is the current directory.
- Type: string
- Default value: .