Extended Salesforce DX project directory template, designed to support complex projects and managed packages.
Extended Salesforce DX project directory template, designed to support complex projects and managed packages.
This template is a starting point for a Salesforce DX project building a managed second-generation package (2GP).
sfdx-project.json (details below).sfdx-project.jsonname property.Use only letters, numbers, and hyphens - when choosing a name. For example:
"name": "my-new-app",namespace property.Use a namespace that is linked to the Developer Hub you plan to build from. For example:
"namespace": "my_namespace",package create command to create a managed package.Execute this command from the root of your SFDX project folder.
sf package create -n "My New 2GP App" -r sfdx-source/packaged -t ManagedpackageDirectory object from sfdx-project.json.The package create command will have created a duplicate packageDirectory object in sfdx-project.json. Here's how to fix this.
packageDirectory object near the top of sfdx-project.json
by changing the value of the package property from "Package Name" to the name
that appears in the packageAliases object.packageDirectory object that was added near the bottom of
sfdx-project.json.toolbelt in your local project.Execute this command from the root of your SFDX project folder.
npm install --prefix ./scripts/js If you get any warnings about security vulernabilities, execute this command
npm audit fix --prefix ./scripts/js toolbelt to create a package development scratch org.Execute this command from the root of your SFDX project folder.
./toolbeltOnce this command finishes, you should be ready to start building.
This project is licensed under the BSD-3-Clause License - see the LICENSE file for details.
No open issues yet, or sync has not completed.