You need to sign in to do that
Don't have an account?
Jayesh Babu A V
Download all the code to local system
I have been creating a lightning app for 3 months and I have completed it. I wrote all my code in the Salesforce Developer Console. So, my question is, is there any simlple way to get all those codes (aura components, controller classes, helper classes, apex classes, visualforce pages, REST classes) and download to my local computer or is there any way to upload all codes to Github or something?
>> create a file in notepad and save it as package.xml in the local storage.
>> https://workbench.developerforce.com/login.php
>> from above navigation button hover on to migration then choose retrieve.
>> Choose the above-created package.xml and now click on retrieve.
You should be able to download the components as a zip file.
You could also use salesforce cli for this purpose.
Additionally, I would suggest you check this particular trailhead module, for better understanding of metadata API:
https://trailhead.salesforce.com/content/learn/modules/package-xml
All Answers
So, to my knowledge I think you can use metadata API to get the components, you could use the below package.xml file to retrieve all the aura components:
Link: https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_auradefinitionbundle.htm
This retrieves both lightning components and lightning web components in case if you want only for lightning web components you can use the package.xml present in the below link
>> https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_lightningcomponentbundle.htm
I hope this helps, in case if this comes handy can you please choose this as the best answer so that it can be used by others in the future.
Regards,
Anutej
>> create a file in notepad and save it as package.xml in the local storage.
>> https://workbench.developerforce.com/login.php
>> from above navigation button hover on to migration then choose retrieve.
>> Choose the above-created package.xml and now click on retrieve.
You should be able to download the components as a zip file.
You could also use salesforce cli for this purpose.
Additionally, I would suggest you check this particular trailhead module, for better understanding of metadata API:
https://trailhead.salesforce.com/content/learn/modules/package-xml