Skip to content

Commit

Permalink
Updates for app
Browse files Browse the repository at this point in the history
  • Loading branch information
wadewegner committed Feb 24, 2018
1 parent 083f7f7 commit e1f1866
Show file tree
Hide file tree
Showing 5 changed files with 68 additions and 9 deletions.
64 changes: 59 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,68 @@
# SFDX App
# GIFter

## Dev, Build and Test
The GIF-to-Chatter app for Lightning Platform you didn't know you needed!

![image](https://user-images.githubusercontent.com/746259/36634388-9d7b0b9e-1958-11e8-83df-dfc65ace47b3.png)

## Resources
## Get a GIPHY API Key

Go to [https://developers.giphy.com/](https://developers.giphy.com/) and create an new app. Grab the API Key and update the `apiKey` in `force-app/main/default/GIPHY.resource`.

## Description of Files and Directories
## 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
```

## Issues
This will only take a moment, and you'll have the following output:

```
=== Ids
NAME VALUE
───────────────────── ──────────────────
Package2 Id 0Ho6A0000004C9hSAE
Subscriber Package Id 0336A0000001JQ6QAM
```
Grab the `Package2 Id`.

Open the `sfdx-project.json` file and replace `YOUR_PACKAGE_ID` with the ID from above (e.g. `0Ho6A0000004C9hSAE`).

Now, create a version of your package:
```
sfdx force:package2:version:create -d force-app --wait 10
```

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.
```

Grab the last ID that starts with `04t` as that's what we'll use when installing into a new environment.

Create a new scratch org:

```
sfdx force:org:create -s -f config/project-scratch-def.json
```

Install the package version:

```
sfdx force:package:install -i 04t6A000001aR9rQAE --wait 10
```

Assign the permission set:

```
sfdx force:user:permset:assign -n GIFter
```

Open the app:

```
sfdx force:org:open -p one/one.app#/n/GIFter
```

Enjoy!
2 changes: 1 addition & 1 deletion force-app/main/default/applications/GIFter.app-meta.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<shouldOverrideOrgTheme>false</shouldOverrideOrgTheme>
</brand>
<formFactors>Large</formFactors>
<label>GIFter</label>
<label>GIFter: GIFs2Chatter</label>
<navType>Standard</navType>
<tabs>GIFter</tabs>
<uiType>Lightning</uiType>
Expand Down
4 changes: 2 additions & 2 deletions force-app/main/default/aura/SearchGIPHY/SearchGIPHY.cmp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
$Resource.jquery331,
$Resource.GIPHY)}" afterScriptsLoaded="{!c.afterScriptsLoaded}" />

<lightning:card>
<lightning:card iconName="utility:search" title="GIPHY Search Terms">

<lightning:layout verticalAlign="end" class="path-to-zip slds-m-around--small">
<lightning:layoutitem flexibility="grow">
Expand All @@ -24,7 +24,7 @@

</lightning:card>

<lightning:card>
<lightning:card iconName="utility:photo" title="GIPHY Search Results">
<lightning:layout horizontalAlign="center" multipleRows="true">

<aura:iteration items="{!v.results}" var="result">
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<CspTrustedSite xmlns="http://soap.sforce.com/2006/04/metadata">
<endpointUrl>https://api.giphy.com</endpointUrl>
<isActive>true</isActive>
</CspTrustedSite>
2 changes: 1 addition & 1 deletion force-app/main/default/tabs/GIFter.tab-meta.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<CustomTab xmlns="http://soap.sforce.com/2006/04/metadata">
<description>Created by Lightning App Builder</description>
<flexiPage>GIFter</flexiPage>
<label>GIFter</label>
<label>Search</label>
<mobileReady>true</mobileReady>
<motif>Custom67: Gears</motif>
</CustomTab>

0 comments on commit e1f1866

Please sign in to comment.