Skip to content

Commit

Permalink
Apply plausible domain on production build
Browse files Browse the repository at this point in the history
  • Loading branch information
vgeorge committed Mar 26, 2024
1 parent 6b1a451 commit de4b401
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/assets/scripts/config/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ module.exports = {
appLongTitle: 'Planetary Computer Land Cover Mapping',
appDescription:
'Microsoft Planetary Computer Land Use/Land Classification Mapping tool',
plausibleDomain: 'landcover.io',
restApiEndpoint: 'https://api.lulc-staging.ds.io',
websocketEndpoint: 'wss://socket.lulc-staging.ds.io',

Expand Down
5 changes: 4 additions & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,10 @@ function serve() {
},
{ match: /{{appTitle}}/g, replace: appTitle },
{ match: /{{appDescription}}/g, replace: appDescription },
{ match: /{{plausibleDomain}}/g, replace: plausibleDomain },
{
match: /{{plausibleDomain}}/g,
replace: process.env.NODE_ENV === 'production' ? plausibleDomain : '',
},
],
});

Expand Down

0 comments on commit de4b401

Please sign in to comment.