Pulling source from a scratch Org

To pull source code components from a scratch Org, use the following command:

sfdx force:source:pull

Let's create a simple component bundle named HelloWorld in the scratch Org and retrieve into the local folder using the preceding command.

To open the Org from the command line, use the following command:

sfdx force:org:open -u <username>

Once you are in the Org, use the Developer Console to create a HelloWorld component, as shown in the following screenshot:

The preceding shows how to use Developer Console to create a Lightning Component Bundle

The code for the component can be very simple, as shown here:

<aura:component >
<div> Test Component </div>
</aura:component>

The following screenshot shows the command-line screen once a source pull has been performed:

You should also see the file in your local folder. 

If you use Visual Studio Code, then you can open the folder to see the file structure, as shown in the following screenshot:

If you want to download and install Visual Studio Code, follow this link: https://code.visualstudio.com/download.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.135.249.220