Setup for Lightning Web Component


https://www.sfdcamplified.com/wp-content/uploads/2019/02/Screenshot_1-300x133.png

Salesforce spring’19 release has brought many exciting features and one of them is lightning web component. It is a new programming model for building Lightning components. This development introduces new tooling standards and conventions into the world of Salesforce development.

Set Up Your Development Environment

To develop Lightning web components, use your favorite code editor. You can’t develop Lightning web components in the Developer Console. To move source code to and from a Salesforce org, use the Salesforce CLI and Visual Studio Code (recommended editor).

For building lightning web component you need

• Install the Salesforce CLI

• Upgrade to the pre-release version

• Install Visual Studio Code

• Install Salesforce Extension Pack

• Install Lightning Web Component Extension

What is Salesforce DX?

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.

Install SFDX CLI

It is a powerful command line interface Used to create environments for development and testing.

Use the below URL to install Salesforce CLI https://developer.salesforce.com/tools/sfdxcli

https://www.sfdcamplified.com/wp-content/uploads/2019/02/word-image.png

Download visual studio code

Visual Studio Code combines the simplicity of a source code editor with powerful developer tooling, like IntelliSense code completion and debugging.

Use below URL to install Visual Studio Code

https://code.visualstudio.com/

https://www.sfdcamplified.com/wp-content/uploads/2019/02/word-image-1.png

Register for pre-release

As Lightning Web Component is still in pre- release state so use below URL to fill pre-release form.

https://www.salesforce.com/form/signup/prerelease-spring19/

https://www.sfdcamplified.com/wp-content/uploads/2019/02/word-image-2.png

Check sfdx version in command prompt

Run: sfdx version

https://www.sfdcamplified.com/wp-content/uploads/2019/02/word-image-3.png

Upgrade CLI with force.com prerelease org.

Run: sfdx plugins:install salesforcedx@pre-release

https://www.sfdcamplified.com/wp-content/uploads/2019/02/word-image-4.png

Verify plugins

After it runs you can verify the installation by typing sfdx plugin and making sure the version number is greater than 45.0.9.

Run:sfdx plugins

https://www.sfdcamplified.com/wp-content/uploads/2019/02/word-image-5.png

Install Salesforce Extensions for Visual Studio Code

With VS Code open you can see the different menu tabs on the left hand side

https://www.sfdcamplified.com/wp-content/uploads/2019/02/word-image-6.png

Install Salesforce Extension pack

This extension pack includes tools for developing on the Salesforce platform in the lightweight, extensible VS Code editor

https://www.sfdcamplified.com/wp-content/uploads/2019/02/word-image-7.png

Install Lightning web component

This extension provides code-editing features for the Lightning Web Components programming model, which is part of the Lightning Component framework.

https://www.sfdcamplified.com/wp-content/uploads/2019/02/word-image-8.png

Ensure Your Development Environment Is Ready

1.Press Ctrl+Shift+P. Type sfdx to filter for sfdx commands.

2.Choose SFDX:Create Project and press enter

https://www.sfdcamplified.com/wp-content/uploads/2019/02/word-image-9.png

Conclusion

The introduction of Lightning web components has brought Salesforce developers with bundle of new tools and resources to build amazing applications.

References

https://developer.salesforce.com/docs/component-library/documentation/lwc

https://developer.salesforce.com/blogs/2018/12/developer-tools-for-lightning-web-components.html

Did you enjoy this article?
Signup today and receive free updates straight in your inbox.
I agree to have my personal information transfered to MailChimp ( more information )
50% LikesVS
50% Dislikes

4 comments on “Setup for Lightning Web Component

Comments are closed.