Skip to content

Commit

Permalink
chore: build
Browse files Browse the repository at this point in the history
  • Loading branch information
dmoosocool committed Oct 31, 2023
1 parent e62cf0d commit 10e85bf
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 2 deletions.
1 change: 1 addition & 0 deletions packages/site/.env.production
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
* To use this, rename to $(.env.production) and set the production SNAP_ORIGIN here
*/
SNAP_ORIGIN=npm:@rss3/social-notifier-snap
ENVIRONMENT=production
11 changes: 11 additions & 0 deletions packages/site/gatsby-config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
import { GatsbyConfig } from 'gatsby';
import dotenv from 'dotenv';

Check failure on line 2 in packages/site/gatsby-config.ts

View workflow job for this annotation

GitHub Actions / Build, Lint, and Test (18.6)

'dotenv' should be listed in the project's dependencies. Run 'npm i -S dotenv' to add it

dotenv.config({
path: `.env.${process.env.NODE_ENV}`,
});

const config: GatsbyConfig = {
// This is required to make use of the React 17+ JSX transform.
Expand All @@ -9,6 +14,12 @@ const config: GatsbyConfig = {
'gatsby-plugin-sharp',
'gatsby-transformer-sharp',
'gatsby-plugin-postcss',
{
resolve: `gatsby-plugin-env-variables`,
options: {
allowList: ['SNAP_ORIGIN', 'ENVIRONMENT'],
},
},
{
resolve: 'gatsby-plugin-manifest',
options: {
Expand Down
5 changes: 3 additions & 2 deletions packages/site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"private": true,
"license": "(MIT-0 OR Apache-2.0)",
"scripts": {
"build": "GATSBY_TELEMETRY_DISABLED=1 gatsby build",
"build": "NODE_ENV=production GATSBY_TELEMETRY_DISABLED=1 gatsby build",
"clean": "rimraf public",
"lint": "yarn lint:eslint && yarn lint:misc --check",
"lint:eslint": "eslint . --cache --ext js,ts",
"lint:fix": "yarn lint:eslint --fix && yarn lint:misc --write",
"lint:misc": "prettier '**/*.json' '**/*.md' '!CHANGELOG.md' --ignore-path .gitignore",
"start": "GATSBY_TELEMETRY_DISABLED=1 gatsby develop"
"start": "NODE_ENV=development GATSBY_TELEMETRY_DISABLED=1 gatsby develop"
},
"browserslist": {
"production": [
Expand Down Expand Up @@ -38,6 +38,7 @@
"autoprefixer": "^10.4.16",
"class-variance-authority": "^0.7.0",
"clsx": "^2.0.0",
"gatsby-plugin-env-variables": "^2.3.0",
"gatsby-plugin-image": "^3.12.3",
"gatsby-plugin-postcss": "^6.12.0",
"gatsby-plugin-sharp": "^5.12.3",
Expand Down
10 changes: 10 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -13367,6 +13367,15 @@ __metadata:
languageName: node
linkType: hard

"gatsby-plugin-env-variables@npm:^2.3.0":
version: 2.3.0
resolution: "gatsby-plugin-env-variables@npm:2.3.0"
peerDependencies:
gatsby: ^5.0.0 || ^4.0.0 || ^3.0.0 || ^2.0.0
checksum: 4325a7a5cddadaf54346e9628029d038c3168c493e33704b05ae18bf4428b77c15cd499010aee70087f29806d0e4d2589c9405c07285f51415baa04dd4a98ea4
languageName: node
linkType: hard

"gatsby-plugin-image@npm:^3.12.3":
version: 3.12.3
resolution: "gatsby-plugin-image@npm:3.12.3"
Expand Down Expand Up @@ -21294,6 +21303,7 @@ __metadata:
eslint-plugin-node: ^11.1.0
eslint-plugin-prettier: ^4.2.1
gatsby: ^5.12.9
gatsby-plugin-env-variables: ^2.3.0
gatsby-plugin-image: ^3.12.3
gatsby-plugin-manifest: ^5.12.3
gatsby-plugin-postcss: ^6.12.0
Expand Down

0 comments on commit 10e85bf

Please sign in to comment.