Skip to content

Commit

Permalink
Add @adobe/gatsby-add-launch-script (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
shazron authored Aug 17, 2020
1 parent 118765a commit e4ba066
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 2 deletions.
5 changes: 4 additions & 1 deletion example/.env.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
GITHUB_TOKEN=
GITHUB_REPO_OWNER=adobe
GITHUB_REPO_NAME=gatsby-theme-parliament
GITHUB_REPO_BRANCH=main
GITHUB_REPO_BRANCH=main
ROOT=example
GATSBY_LAUNCH_SRC=
GATSBY_LAUNCH_SRC_INCLUDE_IN_DEVELOPMENT=
9 changes: 8 additions & 1 deletion packages/gatsby-theme-parliament/gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,13 @@ module.exports = {
branch: process.env.GITHUB_REPO_BRANCH
}
}
}
},
{
resolve: `@adobe/gatsby-add-launch-script`,
options: {
scriptUrl: process.env.GATSBY_LAUNCH_SRC,
includeInDevelopment: process.env.GATSBY_LAUNCH_SRC_INCLUDE_IN_DEVELOPMENT || false
}
}
]
};
1 change: 1 addition & 0 deletions packages/gatsby-theme-parliament/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"@adobe/focus-ring-polyfill": "^0.1.5",
"@adobe/gatsby-remark-afm": "^0.6.0",
"@adobe/gatsby-source-github-file-contributors": "^0.1.1",
"@adobe/gatsby-add-launch-script": "^0.0.3",
"@adobe/prism-adobe": "^1.0.0",
"@emotion/core": "^10.0.28",
"@mdx-js/mdx": "^1.6.6",
Expand Down
2 changes: 2 additions & 0 deletions packages/gatsby-theme-parliament/src/components/Feedback.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const Feedback = ({ onYes, onNo }) => (
<View marginEnd="size-200">
<Button
variant="primary"
className="feedback-yes"
onClick={() => {
onYes && onYes();
}}>
Expand All @@ -37,6 +38,7 @@ const Feedback = ({ onYes, onNo }) => (
</View>
<View>
<Button
className="feedback-no"
variant="primary"
onClick={() => {
onNo && onNo();
Expand Down
8 changes: 8 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@
resolved "https://registry.yarnpkg.com/@adobe/focus-ring-polyfill/-/focus-ring-polyfill-0.1.5.tgz#b20b5bd1ffb0ceaf42aae1f0837f39ce29f9eb9b"
integrity sha512-OLa/TlzPv6vzMPi3DT9/Gefu/HJptcBcFmMYTpeNTZ6Y+t2TL+CZtjGlu438O2V03c86KEEgMlm9nQ70kW3bPw==

"@adobe/gatsby-add-launch-script@^0.0.3":
version "0.0.3"
resolved "https://registry.yarnpkg.com/@adobe/gatsby-add-launch-script/-/gatsby-add-launch-script-0.0.3.tgz#b038770b72f74d05ebf8418e54ec0a1d18d76d69"
integrity sha512-W3ZmolZvb8WeXSroSZZ1dNTPIDSReBDtXG1k4pDJRWaxanA+ziKWzTcT2gy8wl9qd8xCED0bo0bvvyx4g4ItKA==
dependencies:
react "^16.13.1"
react-dom "^16.13.1"

"@adobe/gatsby-remark-afm@^0.6.0":
version "0.6.0"
resolved "https://registry.yarnpkg.com/@adobe/gatsby-remark-afm/-/gatsby-remark-afm-0.6.0.tgz#5de2ab8fd0ebe8e5eea3a7f46ec3feb8f8d51a16"
Expand Down

0 comments on commit e4ba066

Please sign in to comment.