-
Notifications
You must be signed in to change notification settings - Fork 53
Environment Setup
There are no special requirements with regards to the type of Salesforce scratch org needed to support this project.... just that one is created.
For the remainder of these instructions, we will assume that the your Scratch org alias is "myScratchOrg".
As mentioned elsewhere, this codebase is dependent on other open source frameworks. These include:
- FinancialForce's Apex Mocks Framework
- FinancialForce's Apex Common Framework
- Force-DI Framework
- Install The AT4DX code
Using the Salesforce CLI custom plugin "shane-sfdx-plugins" will be the simplest way to accomplish this. If you need to install this plugin, execute the following:
sf plugins install shane-sfdx-plugins
Setup the scratch org
sf org create scratch --wait 30 --duration-days 2 --definition-file config/project-scratch-def.json --alias myScratchOrg
Each of the following frameworks must be installed before the source code from this project can be deployed to a scratch org.
Install the fflib-apex-mocks project
sf shane github src install --convert --githubuser apex-enterprise-patterns --repo fflib-apex-mocks --path sfdx-source/apex-mocks --targetusername myScratchOrg
Install the fflib-apex-commons project
sf shane github src install --convert --githubuser apex-enterprise-patterns --repo fflib-apex-common --path sfdx-source/apex-common --targetusername myScratchOrg
Install the force-di project
sf shane github src install --convert --githubuser apex-enterprise-patterns --repo force-di --path force-di --targetusername myScratchOrg
Here is the full command list:
sf org create scratch --wait 30 --duration-days 2 --definition-file config/project-scratch-def.json --alias myScratchOrg
sf shane github src install --convert --githubuser apex-enterprise-patterns --repo fflib-apex-mocks --path sfdx-source/apex-mocks --targetusername myScratchOrg
sf shane github src install --convert --githubuser apex-enterprise-patterns --repo fflib-apex-common --path sfdx-source/apex-common --targetusername myScratchOrg
sf shane github src install --convert --githubuser apex-enterprise-patterns --repo force-di --path force-di --targetusername myScratchOrg
Simply push the code to the scratch org
sf project deploy start