2020-07-07 17:25:01 -07:00
|
|
|
const ipfsPrefix = process.argv.find(val => val === '--prefix-paths')
|
2020-06-10 21:35:22 -04:00
|
|
|
|
2020-07-07 17:25:01 -07:00
|
|
|
// Normal build for sites served with nginx or Apache.
|
2020-07-06 04:45:16 -03:00
|
|
|
const normalConfig = [
|
2020-07-06 13:56:15 -07:00
|
|
|
'gatsby-plugin-react-helmet',
|
2020-06-10 21:35:22 -04:00
|
|
|
{
|
2020-07-06 13:56:15 -07:00
|
|
|
resolve: 'gatsby-source-filesystem',
|
2020-06-10 21:35:22 -04:00
|
|
|
options: {
|
2020-11-06 16:52:53 -08:00
|
|
|
// start_url: '/',
|
2020-07-06 13:56:15 -07:00
|
|
|
name: 'images',
|
|
|
|
|
path: `${__dirname}/src/images`
|
|
|
|
|
}
|
2020-06-10 21:35:22 -04:00
|
|
|
},
|
2020-07-06 13:56:15 -07:00
|
|
|
'gatsby-transformer-sharp',
|
|
|
|
|
'gatsby-plugin-sharp',
|
2020-06-10 21:35:22 -04:00
|
|
|
{
|
2020-07-06 13:56:15 -07:00
|
|
|
resolve: 'gatsby-plugin-manifest',
|
2020-06-10 21:35:22 -04:00
|
|
|
options: {
|
2020-07-06 13:56:15 -07:00
|
|
|
name: 'gatsby-starter-default',
|
|
|
|
|
short_name: 'starter',
|
|
|
|
|
start_url: '/',
|
|
|
|
|
background_color: '#663399',
|
|
|
|
|
theme_color: '#663399',
|
|
|
|
|
display: 'minimal-ui'
|
|
|
|
|
// icon: `src/images/gatsby-icon.png`, // This path is relative to the root of the site.
|
|
|
|
|
}
|
|
|
|
|
}
|
2020-06-18 16:29:36 -07:00
|
|
|
|
2020-06-10 21:35:22 -04:00
|
|
|
// this (optional) plugin enables Progressive Web App + Offline functionality
|
|
|
|
|
// To learn more, visit: https://gatsby.dev/offline
|
|
|
|
|
// `gatsby-plugin-offline`,
|
|
|
|
|
]
|
2020-06-18 16:29:36 -07:00
|
|
|
|
2020-07-07 17:25:01 -07:00
|
|
|
// Building for deployment over IPFS or with UncensorablePublishing.com tools.
|
|
|
|
|
const ipfsConfig = [
|
|
|
|
|
'gatsby-plugin-ipfs',
|
|
|
|
|
'gatsby-plugin-react-helmet',
|
|
|
|
|
{
|
|
|
|
|
resolve: 'gatsby-source-filesystem',
|
|
|
|
|
options: {
|
|
|
|
|
start_url: '__GATSBY_IPFS_PATH_PREFIX__',
|
|
|
|
|
name: 'images',
|
|
|
|
|
path: `${__dirname}/src/images`
|
|
|
|
|
}
|
2020-06-07 14:53:58 -07:00
|
|
|
},
|
2020-07-07 17:25:01 -07:00
|
|
|
'gatsby-transformer-sharp',
|
|
|
|
|
'gatsby-plugin-sharp',
|
|
|
|
|
{
|
|
|
|
|
resolve: 'gatsby-plugin-manifest',
|
|
|
|
|
options: {
|
|
|
|
|
name: 'gatsby-starter-default',
|
|
|
|
|
short_name: 'starter',
|
|
|
|
|
start_url: '__GATSBY_IPFS_PATH_PREFIX__',
|
|
|
|
|
background_color: '#663399',
|
|
|
|
|
theme_color: '#663399',
|
|
|
|
|
display: 'minimal-ui',
|
|
|
|
|
icon: 'src/images/gatsby-icon.png' // This path is relative to the root of the site.
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// this (optional) plugin enables Progressive Web App + Offline functionality
|
|
|
|
|
// To learn more, visit: https://gatsby.dev/offline
|
|
|
|
|
// `gatsby-plugin-offline`,
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
// Common settings to export.
|
|
|
|
|
const exportObj = {
|
|
|
|
|
siteMetadata: {
|
|
|
|
|
title: 'FullStack.cash Web Wallet',
|
|
|
|
|
description: 'A BCH web wallet that uses FullStack.cash for its back end.',
|
|
|
|
|
author: '@christroutner'
|
|
|
|
|
}
|
2020-06-07 14:53:58 -07:00
|
|
|
}
|
2020-07-07 17:25:01 -07:00
|
|
|
|
|
|
|
|
// Build for IPFS
|
|
|
|
|
if (ipfsPrefix) {
|
|
|
|
|
exportObj.pathPrefix = '__GATSBY_IPFS_PATH_PREFIX__'
|
|
|
|
|
exportObj.plugins = ipfsConfig
|
|
|
|
|
} else {
|
|
|
|
|
// Build for normal
|
|
|
|
|
exportObj.plugins = normalConfig
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
module.exports = exportObj
|