The most powerful feature of Salesforce is the level of customization that it allows. With the developer options, new web controls, custom web apps can be developed for customizing the salesforce environment. To start developing on the Salesforce platform, the development environment needs to be set up first. This can be accomplished with the steps described below.
The first step for setting up the developer environment will be setting up the code editor. This is where the developers will write their code to create customization on the salesforce application. The most preferred code editor for salesforce is Visual Studio Code because it comes with the Salesforce extension pack that is compatible with Salesforce components such as Salesforce CLI, Apex, and Lightning component framework. Visual Studio Code can be downloaded from its official website mentioned below.
https://code.visualstudio.com/
Once it is downloaded it needs to be installed as an application.
It’s open-source software, and available on all the three platforms Windows, Linux, and Mac.
Post-installation of Visual Studio Code, the salesforce extension pack needs to be installed. To do this.
This will show the commands provided by salesforce extensions and can be used for developing the lightning web component.
The code editor is all set to be used for developing a new lightning web component.
The errors in a particular code need to be detected through the Linting. Linting allows error detection even before the compilation of the code. Linting checks the spellings, code pattern, etc. The Linting rules are created by Salesforce, to enforce a precheck for the creation of web components. Linting can be implemented for VSCode through the ESLint package. ESLint extension can be directly installed from the VS Code marketplace. It can be installed globally as well by running the following command.
npm install -g eslint
The second option can be tried if you are unable to install the extension VS Code marketplace.
Once ESLint is installed, we can run it once to validate the installation.
.\node_modules\.bin\eslint –init
Setting Up a development org
In the next setup sign up for developer edition org. This can be done from the link given below.
https://developer.salesforce.com/signup
Why you should signup for developer edition org?
Signing up for developer edition org can be done in a few steps:
Here the apps can be developed as scratch org and non-scratch org. In scratch org, the source code and metadata of the Salesforce app is completely source driven and deployment is disposable. These apps are fully configurable and are meant for automation or reused by developers. A non-scratch org is created in an environment similar to the Sandbox environment. These are the apps that are created for a specific purpose with a specific feature. To create the scratch org apps, set the org as Dev Hub. This can be done in a few quick easy steps given below:
With the salesforce domain, the domain of the business needs to be setup. For example, my mybusiness is a subdomain, the salesforce domain, the complete link will be read as mybusiness. Salesforce. Com. This can be done with the following steps.
The last step in setting up the environment mode is setting up the debug mode. This will help to debug the Javascript code. This can be done from the setting, and then look for “Debug mode” in the quick find box. Then enable the debug mode.
Your developer environment is ready. You can start creating lightning web components, and deploy it in your org.