Set Up Your Salesforce DX Environment
In this project, you’ll:
- Install Salesforce CLI.
- Install Visual Studio Code and extensions for Salesforce DX.
- Create and deploy a Lightning web component.
Lightning Web Components is a new programming model for building Lightning components. It uses web standards breakthroughs, can coexist and interoperate with the Aura programming model, and delivers unparalleled performance. To create and develop Lightning Web Components and use their powerful features and performance benefits, you need to set up Salesforce DX. For this Quick Start, you also use Visual Studio Code, which is the recommended code editor for developing on the Salesforce platform. Once your developer environment is ready, you learn how to write a simple Lightning web component and add it to a page in Lightning Experience.
The Salesforce Developer Experience (DX) is a set of tools that streamlines the entire development life cycle. It improves team development and collaboration, facilitates automated testing and continuous integration, and makes the release cycle more efficient and agile.
Follow Along with Trail Together
Want to follow along with an expert as you work through this step? Take a look at this video, part of the Trail Together series on Trailhead Live. You can find a link to the full session in the Resources section.
Set Up Your Trailhead Playground
Create a new Trailhead Playground.
- To create a new Trailhead Playground, click the dropdown at the end of this step and select Create a Trailhead Playground.
- Once you have a Trailhead Playground, click Launch.
Reset your password. You need both your username and password to authenticate your Trailhead Playground with the Salesforce CLI in a later step.
If you see a tab in your org labeled Get Your Login Credentials, great! Follow the steps below. If not, from the App Launcher(), find and select Playground Starter and follow the steps. If you don’t see the Playground Starter app, check out Find the Username and Password for Your Trailhead Playground on Trailhead Help.
- Click the Get Your Login Credentials tab and take note of your username.
- Click Reset My Password. This sends an email to the address associated with your username.
- Click the link in the email.
- Enter a new password, confirm it, and click Change Password.
Install the Command Line Interface (CLI)
Use the Salesforce CLI to control the full application life cycle of your Salesforce apps. With it you can easily create environments for development and testing, synchronize source code between your orgs and VCS, and execute tests.
See the Salesforce CLI Setup Guide for complete installation instructions.
- Install the CLI from https://developer.salesforce.com/tools/sfdxcli.
- Confirm the CLI is properly installed and on the latest version by running the following command from the command line.
sfdx updateYou should see output like
sfdx-cli: Updating CLI....
In our next step, we set up our local development environment with Visual Studio Code.
We won’t check any of your setup. Click Verify Step to go to the next step in the project.