Newer Version Available
Review Org Setup
First, if you plan to use namespaces with your packages, complete these tasks.
- Log in to the Dev Hub org.
- Enable and deploy My Domain in the Dev Hub org.
If you don’t enable and deploy My Domain, you can’t link your namespace to the Dev Hub org.
-
Create
a Developer Edition (DE) org to use as your namespace org for testing.
Unlike first-generation packaging, there’s no need to create a package or packaging org for second-generation packaging. You can create multiple test packages for a namespace by using the CLI and authenticating to the Dev Hub org.
- Log in to the namespace org, and specify a namespace.
Most customers use a single namespace org but you can use more than one if you want more granular control over how you organize metadata. There can be a short delay between the time when you deploy My Domain and when the Link Namespace button appears in the Dev Hub org.
- In the Dev Hub org, link each namespace you want to work with.
- Create a project and specify your configuration options in sfdx-project.json.
- Create a scratch org where you can develop, install, and test versions of your packages.
- (Recommended) Specify an alias for each org you plan to work with. An alias lets you give your orgs an easy to remember name so you can move between orgs easily while you work with packages.