Advertisement
Guest User

Untitled

a guest
May 20th, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.71 KB | None | 0 0
  1. # Projects
  2. - Project creation:
  3.  
  4. `sfdx force:project:create -n {name} --template standard`
  5.  
  6. # Meta Data API
  7. - Retrieve Meta Data:
  8.  
  9. `sfdx force:mdapi:retrieve -s -k {packageFilePath} -r {localDir} -u {org} -w 10`
  10.  
  11. - Convert to Source:
  12.  
  13. `sfdx force:mdapi:convert -r {unpackagedDirPath}`
  14.  
  15. # Dev hub
  16. - Authenticate to DevHub:
  17.  
  18. `sfdx force:auth:web:login -d -a {devHubAlias}`
  19.  
  20. - Deploy code to DevHub:
  21.  
  22. `sfdx force:source:deploy -p force-app -u {devHubAlias}`
  23.  
  24. # Scratch orgs
  25. - Create scratch org:
  26.  
  27. `sfdx force:org:create --definitionfile config/project-scratch-def.json --durationdays 30 --setalias {scratchOrgAlias} -v {devHubAlias}`
  28.  
  29. - Open scratch org:
  30.  
  31. `sfdx force:org:open -u {scratchOrgAlias}`
  32.  
  33. - Push source to scratch org
  34.  
  35. `sfdx force:source:push`
  36.  
  37. - Delete scratch org:
  38.  
  39. `sfdx force:org:delete -u {aliasOrUsername}`
  40.  
  41. # Sample Data
  42. - Load sample Data
  43.  
  44. `sfdx force:data:tree:import --plan {pathToSampleDataJson}`
  45.  
  46. # Packages
  47. - Create an Unlocked package:
  48.  
  49. `sfdx force:package:create --name {packageName} --description {packageDescription} --packagetype Unlocked --path force-app --nonamespace --targetdevhubusername {productionOrgAlias}`
  50.  
  51. - Create a package version:
  52.  
  53. `sfdx force:package:version:create -p {package_name} -d force-app -k {installationKey} --wait 10 -v {devHubAlias}`
  54.  
  55. - Install a package version to scratch Org:
  56.  
  57. `sfdx force:package:install --wait 10 --publishwait 10 --package {packageVersionName} -k {installationKey} -r -u {scratchOrgAlias}`
  58.  
  59. - Promote / Publish a package version:
  60.  
  61. `sfdx force:package:version:promote -p {packageVersionName} -v {devHubAlias}`
  62.  
  63. - Install a package version:
  64.  
  65. `sfdx force:package:install -k {installationKey} -p {packageVersionName} -u {orgAlias} -w 10`
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement