This repository has been archived by the owner on Feb 12, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 395
Update README and CLI commands #7
Open
douglascayers
wants to merge
1
commit into
forcedotcom:master
Choose a base branch
from
douglascayers:dayers-patch-1
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,8 @@ | |
|
||
The GIF-to-Chatter app for Lightning Platform you didn't know you needed! | ||
|
||
This repo was developed for the [Quick Start: Unlocked Packages](https://trailhead.salesforce.com/projects/quick-start-unlocked-packages?trailmix_creator_id=00550000006yDdKAAU&trailmix_id=dreamforce-18-how-build-your-first-sfdx-app-with-unlocked-pkg) Trailhead project. | ||
|
||
![image](https://user-images.githubusercontent.com/746259/36634388-9d7b0b9e-1958-11e8-83df-dfc65ace47b3.png) | ||
|
||
## Get a GIPHY API Key | ||
|
@@ -11,8 +13,9 @@ Go to [https://developers.giphy.com/](https://developers.giphy.com/) and create | |
## Create an Unlocked Package | ||
|
||
Create an Unlocked package: | ||
|
||
``` | ||
sfdx force:package2:create -n GIFter -d "Using GIPHY to find GIFs and post to Chatter" -o Unlocked | ||
sfdx force:package:create -n GIFter -d "Using GIPHY to find GIFs and post to Chatter" -r force-app -t Unlocked -v DevHub | ||
``` | ||
|
||
This will only take a moment, and you'll have the following output: | ||
|
@@ -21,23 +24,26 @@ This will only take a moment, and you'll have the following output: | |
=== Ids | ||
NAME VALUE | ||
───────────────────── ────────────────── | ||
Package2 Id 0Ho6A0000004C9hSAE | ||
Subscriber Package Id 0336A0000001JQ6QAM | ||
Package Id 0Hoxxx | ||
``` | ||
Grab the `Package2 Id`. | ||
|
||
Open the `sfdx-project.json` file and replace `YOUR_PACKAGE_ID` with the ID from above (e.g. `0Ho6A0000004C9hSAE`). | ||
Grab the `Package Id`. | ||
|
||
Open the `sfdx-project.json` file. | ||
Notice that the `package:create` command updates the project file to include important details about the package. In `packageDirectories`, you can see the package name you defined, with placeholders for the version name and version number. The command also creates a `packageAliases` section, which maps the package name (alias) to its corresponding package ID (`0Ho`). | ||
|
||
Now, create a version of your package: | ||
|
||
``` | ||
sfdx force:package2:version:create -d force-app --wait 10 | ||
sfdx force:package:version:create -p GIFter -d force-app -k test1234 --wait 10 -v DevHub | ||
``` | ||
|
||
This will take a few moments. When complete, you'll have a message like the following: | ||
|
||
``` | ||
Successfully created the package2 version [08c6A0000004CFWQA2]. Package2 Version Id: 05i6A000000CaSoQAK. | ||
Subscriber Package2 Version Id: 04t6A000001aR9rQAE. | ||
Successfully created the package version [08cxxx]. Subscriber Package Version Id: 04txxx. | ||
Package Installation URL: https://login.salesforce.com/packaging/installPackage.apexp?p0=04txxx | ||
As an alternative, you can use the "sfdx force:package:install" command. | ||
``` | ||
|
||
Grab the last ID that starts with `04t` as that's what we'll use when installing into a new environment. | ||
|
@@ -51,7 +57,7 @@ sfdx force:org:create -s -f config/project-scratch-def.json | |
Install the package version: | ||
|
||
``` | ||
sfdx force:package:install -i 04t6A000001aR9rQAE --wait 10 | ||
sfdx force:package:install --wait 10 --publishwait 10 --package [email protected] -k test1234 --noprompt | ||
``` | ||
|
||
Assign the permission set: | ||
|
@@ -63,7 +69,7 @@ sfdx force:user:permset:assign -n GIFter | |
Open the app: | ||
|
||
``` | ||
sfdx force:org:open -p one/one.app#/n/GIFter | ||
sfdx force:org:open -p //lightning/n/GIFter | ||
``` | ||
|
||
Enjoy! | ||
Enjoy! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
{ | ||
"orgName": "wade.wegner Company", | ||
"orgName": "GIFter", | ||
"edition": "Developer", | ||
"orgPreferences" : { | ||
"enabled": ["S1DesktopEnabled", "ChatterEnabled"], | ||
"disabled": ["S1EncryptedStoragePref2"] | ||
"settings" : { | ||
"orgPreferenceSettings" : { | ||
"s1EncryptedStoragePref2" : false | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
force-app/main/default/aura/SearchGIPHY/SearchGIPHY.cmp-meta.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<AuraDefinitionBundle xmlns="urn:metadata.tooling.soap.sforce.com" fqn="SearchGIPHY"> | ||
<apiVersion>42.0</apiVersion> | ||
<apiVersion>44.0</apiVersion> | ||
<description>A Lightning Component Bundle</description> | ||
</AuraDefinitionBundle> |
This file was deleted.
Oops, something went wrong.
5 changes: 0 additions & 5 deletions
5
force-app/main/default/aura/SearchGIPHY/SearchGIPHYRenderer.js
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ApexClass xmlns="urn:metadata.tooling.soap.sforce.com" fqn="ChatterHelper"> | ||
<apiVersion>42.0</apiVersion> | ||
<apiVersion>44.0</apiVersion> | ||
<status>Active</status> | ||
</ApexClass> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,11 @@ | ||
{ | ||
"packageDirectories": [ | ||
{ | ||
"path": "force-app", | ||
"default": true, | ||
"id": "YOUR_PACKAGE_ID", | ||
"versionNumber": "1.0.0.NEXT", | ||
"versionName": "Spring ‘18" | ||
} | ||
], | ||
"namespace": "", | ||
"sfdcLoginUrl": "https://login.salesforce.com", | ||
"sourceApiVersion": "42.0" | ||
} | ||
"packageDirectories": [ | ||
{ | ||
"path": "force-app", | ||
"default": true | ||
} | ||
], | ||
"namespace": "", | ||
"sfdcLoginUrl": "https://login.salesforce.com", | ||
"sourceApiVersion": "44.0" | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @douglascayers - just curious why you aren't also "enabling" chatter and Lightning, per the original scratch def.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @ekapner, I left those out because they weren't necessary, at least not in my tests. New orgs come with Chatter and Lightning already enabled. It doesn't hurt to include them though to be overly explicit.