Book Image

Learning Salesforce Lightning Application Development

By : Mohit Shrivatsava
Book Image

Learning Salesforce Lightning Application Development

By: Mohit Shrivatsava

Overview of this book

Built on the Salesforce App Cloud, the new Salesforce Lightning Experience combines three major components: Lightning Design System, Lightning App Builder, and Lightning Components, to provide an enhanced user experience. This book will enable you to quickly create modern, enterprise apps with Lightning Component Framework. You will start by building simple Lightning Components and understanding the Lightning Components architecture. The chapters cover the basics of Lightning Component Framework semantics and syntax, the security features provided by Locker Service, and use of third-party libraries inside Lightning Components. The later chapters focus on debugging, performance tuning, testing using Lightning Testing Services, and how to publish Lightning Components on Salesforce AppExchange.
Table of Contents (22 chapters)
Title Page
PacktPub.com
Foreword
Contributors
Preface
Index

Salesforce DX commands


In this section, we will cover some basic commands to authorize Salesforce, set a default Dev Hub username, and scaffold a Salesforce DX application.

auth commands

The first thing you will need to do is to connect the CLI to Salesforce. The CLI provides commands to connect using web-based OAuth flow, JWT token-based flow, and an sfdx auth URL.

Use JWT-based flow for CI. If you are using Salesforce DX with Travis, Circle, or Jenkins, then it's always recommended to use JWT-based flow.

To connect the Dev Hub to the CLI, run the following command:

sfdx force:auth:web:login -r https://login.Salesforce.com

For Sandbox Orgs, use test.Salesforce.com instead.

The following screenshot shows the Terminal once the CLI has been authorized to connect to Salesforce:

Setting a default Dev Hub for scratch Org creation

To configure the default Dev Hub globally, execute the following command:

sfdx force:config:set [email protected] -g  //use your developer hub username instead...