Choose Your Installation Method
There are three ways to install Lightning Web Components Recipes. Choose the method that best fits your needs:Scratch Org
Unlocked Package
Developer Edition
Method 1: Scratch Org Installation
Prerequisites
Set up your environment
- Enable Dev Hub in your Trailhead Playground
- Install Salesforce CLI
- Install Visual Studio Code
- Install the Visual Studio Code Salesforce extensions, including the Lightning Web Components extension
Installation Steps
Authorize your Dev Hub
Clone the repository
Create a scratch org
Push the source code
Assign the permission set
Import sample data
Open your scratch org
Activate a theme
Launch the app
Method 2: Unlocked Package Installation
Prerequisites
- A Salesforce org: Developer Edition Org (free) or Trailhead Playground
- Start from a brand-new environment to avoid conflicts
Installation Steps
Log in to your org
Install the package
04tKi000000kbj6IAA (Version 65.0.0-14)Select installation option
Import sample data
-
Download the CSV file: Accounts-Contacts.csv
- Right-click and save as Accounts-Contacts.csv
- In Setup, search for Data Import Wizard in the Quick Find box
- Click Launch Wizard
- Select Accounts and Contacts, then click Add New Records
- Drag the Accounts-Contacts.csv file to the upload area
- Click Next, Next, and Start Import
Assign permission set (if needed)
- Go to Setup > Users > Permission Sets
- Click recipes
- Click Manage Assignments
- Check your user and click Add Assignments
Activate a theme
Launch the app
Method 3: Developer Edition / Trailhead Playground
Prerequisites
- Salesforce CLI installed
- A Developer Edition Org (free) or Trailhead Playground
- Start from a brand-new environment to avoid conflicts
Installation Steps
Clone the repository
Authorize your org
Deploy the app
Assign the permission set
recipes permission set to the default user:Import sample data
Open your org
Activate a theme
Launch the app
Optional: Development Tools Setup
Code Formatting with Prettier
Prettier ensures consistent code formatting across the codebase.- Install the Prettier VSCode extension
- The
.prettierignoreand.prettierrcfiles are included in the repository
Code Linting with ESLint
ESLint identifies stylistic errors and erroneous constructs in JavaScript.- Install the Salesforce Extension Pack for VSCode
- The
.eslintignorefile is included to exclude specific files from linting
Pre-commit Hooks
Set up automatic code formatting and linting before each commit:Install Node.js
Install dependencies
Use formatting commands
