Configure Your Project
A. Ensure you have enabled and authenticated to DevHub
Ensure you have enabled DevHub in your production org or created a developer org.
B. Authenticate your Salesforce CLI to DevHub
Ensure you have authenticated your local development environment to your DevHub. If you are not familiar with the process, you can follow the instructions provided by Salesforce here.
C. Add additional attributes to your Salesforce DX Project
Navigate to your sfdx-project.json file and locate the
packageDirectories
property.
{
"packageDirectories" : [
{ "path": "force-app", "default": true},
{ "path" : "unpackaged" },
{ "path" : "utils" }
],
"namespace": "",
"sfdcLoginUrl" : "https://login.salesforce.com",
"sourceApiVersion": "60.0"
}
In the above example, the package directories are
force-app
unpackaged
utils
Add the following additional attributes to the sfdx-project.json and save.
package
versionNumber
{
"packageDirectories" : [
{
"package": "force-app",
"versionNumber": "1.0.0.NEXT",
"path": "force-app",
"default": true
},
{ "path" : "unpackaged" }, // You can repeat the same for additonal directories
{ "path" : "utils" } // You can repeat the same for additonal directories
],
"namespace": "",
"sfdcLoginUrl" : "https://login.salesforce.com",
"sourceApiVersion": "60.0"
}
Thats the minimal configuration required to run sfp on a project.
Move on to the next chapter to execute sfp commands in this directory.
Last updated
Was this helpful?