Creating a managed package

To create a managed package, the first step is to get the code and components from the scratch Org to the Developer Org where we have enabled the namespace. In order to do this, we need to convert the source code from the scratch format into the metadata API format.

To convert the source code into the metadata API format, run the following command in the Terminal in the directory where you have the Salesforce app. This command converts the source from the force-app, creates an API metadata equivalent, and outputs to the mdapi_output_dir directory. Notice that -n is followed by the name of the managed package application:

sfdx force:source:convert  -d mdapi_output_dir -n 'Youtube Search Application'

The following ...

Get Learning Salesforce Lightning Application Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.