Commands to demo SFDX
#!/bin/bash | |
function prompt { | |
echo "" | |
echo $1 | |
} | |
prompt "Create project workspace..." | |
sfdx force:project:create -n Demo | |
cd Demo | |
prompt "Create a scratch org..." | |
sfdx force:org:create -s -a Demo -f config/project-scratch-def.json | |
prompt "Check the source status..." | |
sfdx force:source:status | |
prompt "Create a lightning component" | |
sfdx force:lightning:component:create -n MyComp -d force-app/main/default/aura/ | |
prompt "Push the source..." | |
sfdx force:source:push | |
prompt "Check the source status..." | |
sfdx force:source:status | |
prompt "Pull in some open source DX source..." | |
echo "git clone https://github.com/dcarroll/YelpDemo" | |
git clone https://github.com/dcarroll/YelpDemo | |
prompt "Swith to the source branch of this component..." | |
cd YelpDemo | |
echo "git checkout source" | |
git checkout source | |
cd .. | |
prompt "Add the YelpDemo folder to the packageDirctories in the project.json..." | |
cat sfdx-project.json | jq '.packageDirectories |= .+ [{"path": "YelpDemo", "default": false}]' > new.json | |
cat new.json > sfdx-project.json | |
prompt "Push the new component to the scratch org..." | |
sfdx force:source:push | |
prompt "Check the source status..." | |
sfdx force:source:status |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment