Newer Version Available

This content describes an older version of this product. View Latest

Create Lightning Apps and Aura Components

You can use Salesforce CLI to create Lightning apps and Aura components in your local Salesforce DX project. The generated files live in an aura directory in a package directory of your project.
  1. Open a terminal (macOS and Linux) or command prompt Windows and change to your Salesforce DX project directory.
  2. Create the aura directory in the location you want to generate the Lightning app and Aura components. For example, if you want to generate them in the default package directory, create the force-app/main/default/aura directory if it doesn’t exist.
  3. Create a Lightning app or an Aura component; specify the app or component name with the --name flag and the aura directory with the --output-dir flag.

Use the project deploy start command to deploy the new Lightning app and Aura component to your org.