-
Notifications
You must be signed in to change notification settings - Fork 1
/
gatsby-config.js
96 lines (81 loc) · 2.09 KB
/
gatsby-config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
const path = require('path');
const dotenv = require('dotenv');
const { getFirebaseCredentials } = require('./src/utils/firebase/credentials-node');
// Dotenv
dotenv.config();
// Firebase
const firebaseCredentials = getFirebaseCredentials();
// Environment
const { NODE_ENV, GATSBY_API_URL, GATSBY_SENTRY_DSN, GATSBY_ANALYTICS_TRACKING_ID } = process.env;
//Authors
const authors = [
'Hugo Farji',
'Juan Gomez',
'Gonzalo Pozzo',
'Leonardo Galante',
'Rosario Maldonado',
'Antonela Bianculli',
];
// Absolute Import
const folderPaths = ['pages', 'utils', 'components', 'modules', 'ui', 'images'];
const rootImportOptions = folderPaths.reduce(
(acc, folderPath) => ({ ...acc, [folderPath]: path.join(__dirname, `src/${folderPath}`) }),
{},
);
// Metadata
const siteMetadata = {
title: 'Estrenos',
author: authors.join(', '),
description: 'Encontrá todos los últimos estrenos y las funciones en todos los cines!',
};
// Plugins
const plugins = [
'gatsby-plugin-antd',
'gatsby-plugin-eslint',
'gatsby-plugin-netlify',
'gatsby-plugin-react-helmet',
'gatsby-plugin-styled-components',
// GraphQL Estrenos API
{
resolve: 'gatsby-source-graphql',
options: {
typeName: 'ESTRENOS',
fieldName: 'estrenos',
url: `${GATSBY_API_URL}/graphql`,
},
},
// Absolute Imports
{
resolve: 'gatsby-plugin-root-import',
options: rootImportOptions,
},
// Firebasee
{
resolve: 'gatsby-plugin-firebase',
options: { credentials: firebaseCredentials },
},
// Analytics
{
resolve: 'gatsby-plugin-google-analytics',
options: { trackingId: GATSBY_ANALYTICS_TRACKING_ID },
},
// Sentry Error Logging
{
resolve: 'gatsby-plugin-sentry',
options: { environment: NODE_ENV, dsn: GATSBY_SENTRY_DSN },
},
// PWA Manifest
{
resolve: 'gatsby-plugin-manifest',
options: {
name: 'Estrenos',
start_url: '/',
display: 'minimal-ui',
short_name: 'Estrenos',
theme_color: '#FFFFFF',
background_color: '#FFFFFF',
icon: 'src/images/icon.png',
},
},
];
module.exports = { siteMetadata, plugins };