@openeventkit/event-site 2.0.75 → 2.0.76

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/gatsby-config.js +172 -170
  2. package/package.json +1 -1
package/gatsby-config.js CHANGED
@@ -22,182 +22,184 @@ catch (e) {
22
22
 
23
23
  const title = siteSettings?.siteMetadata?.title || process.env.GATSBY_METADATA_TITLE || "Event Site";
24
24
  const description = siteSettings?.siteMetadata?.description || process.env.GATSBY_METADATA_DESCRIPTION || "Event Site";
25
- const manifestFaviconSettings = siteSettings?.favicon?.asset ? {
26
- icon: `${SITE_SETTINGS_DIR_PATH}/${siteSettings.favicon.asset}`,
27
- include_favicon: true
28
- } : {};
25
+ const faviconAsset = siteSettings?.favicon?.asset;
29
26
 
30
- module.exports = {
31
- siteMetadata: {
32
- title: title,
33
- description: description
34
- },
35
- plugins: [
36
- {
37
- resolve: "gatsby-plugin-manifest",
38
- options: {
39
- name: title,
40
- short_name: title,
41
- description: description,
42
- start_url: "/",
43
- // Enables "Add to Homescreen" prompt and disables browser UI (including back button)
44
- // see https://developers.google.com/web/fundamentals/web-app-manifest/#display
45
- display: "minimal-ui",
46
- ...manifestFaviconSettings
27
+ const manifestPlugin = faviconAsset ? [
28
+ {
29
+ resolve: "gatsby-plugin-manifest",
30
+ options: {
31
+ name: title,
32
+ short_name: title,
33
+ description: description,
34
+ start_url: "/",
35
+ display: "minimal-ui",
36
+ icon: path.join(SITE_SETTINGS_DIR_PATH, faviconAsset),
37
+ include_favicon: true
38
+ }
39
+ }
40
+ ] : [];
41
+
42
+ const plugins = [
43
+ ...manifestPlugin,
44
+ {
45
+ resolve: "gatsby-alias-imports",
46
+ options: {
47
+ aliases: {
48
+ "@utils": `${__dirname}/src/utils`
47
49
  }
48
- },
49
- {
50
- resolve: "gatsby-alias-imports",
51
- options: {
52
- aliases: {
53
- "@utils": `${__dirname}/src/utils`
50
+ }
51
+ },
52
+ {
53
+ /**
54
+ * Gatsby v4 uses ES Modules for importing cssModules by default.
55
+ * Disabling this to avoid needing to update in all files and for compatibility
56
+ * with other plugins/packages that have not yet been updated.
57
+ * @see https://www.gatsbyjs.com/docs/reference/release-notes/migrating-from-v2-to-v3/#css-modules-are-imported-as-es-modules
58
+ *
59
+ * Also, since libSass was deprecated in October 2020, the Node Sass package has also been deprecated.
60
+ * As such, we have migrated from Node Sass to Dart Sass in package.json.
61
+ * @see https://www.gatsbyjs.com/plugins/gatsby-plugin-sass/#v300
62
+ * @see https://sass-lang.com/blog/libsass-is-deprecated#how-do-i-migrate
63
+ */
64
+ resolve: "gatsby-plugin-sass",
65
+ options: {
66
+ cssLoaderOptions: {
67
+ esModule: false,
68
+ modules: {
69
+ namedExport: false
54
70
  }
55
71
  }
56
- },
57
- {
58
- /**
59
- * Gatsby v4 uses ES Modules for importing cssModules by default.
60
- * Disabling this to avoid needing to update in all files and for compatibility
61
- * with other plugins/packages that have not yet been updated.
62
- * @see https://www.gatsbyjs.com/docs/reference/release-notes/migrating-from-v2-to-v3/#css-modules-are-imported-as-es-modules
63
- *
64
- * Also, since libSass was deprecated in October 2020, the Node Sass package has also been deprecated.
65
- * As such, we have migrated from Node Sass to Dart Sass in package.json.
66
- * @see https://www.gatsbyjs.com/plugins/gatsby-plugin-sass/#v300
67
- * @see https://sass-lang.com/blog/libsass-is-deprecated#how-do-i-migrate
68
- */
69
- resolve: "gatsby-plugin-sass",
70
- options: {
71
- cssLoaderOptions: {
72
- esModule: false,
73
- modules: {
74
- namedExport: false
72
+ }
73
+ },
74
+ {
75
+ // Add image assets before markdown or json files
76
+ resolve: "gatsby-source-filesystem",
77
+ options: {
78
+ path: `${__dirname}/static/img`,
79
+ name: "uploads"
80
+ }
81
+ },
82
+ {
83
+ // Add image assets before markdown or json files
84
+ resolve: "gatsby-source-filesystem",
85
+ options: {
86
+ path: `${__dirname}/src/img`,
87
+ name: "images"
88
+ }
89
+ },
90
+ {
91
+ // Add font assets before markdown or json files
92
+ resolve: "gatsby-source-filesystem",
93
+ options: {
94
+ path: `${__dirname}/static/fonts`,
95
+ name: "fonts"
96
+ }
97
+ },
98
+ {
99
+ resolve: "gatsby-source-filesystem",
100
+ options: {
101
+ path: `${__dirname}/src/pages`,
102
+ name: "pages"
103
+ }
104
+ },
105
+ {
106
+ resolve: "gatsby-source-filesystem",
107
+ options: {
108
+ path: path.resolve(CONTENT_PAGES_DIR_PATH),
109
+ name: "contentPages"
110
+ }
111
+ },
112
+ {
113
+ resolve: "gatsby-source-filesystem",
114
+ options: {
115
+ path: path.resolve(STATIC_CONTENT_DIR_PATH),
116
+ name: "content"
117
+ }
118
+ },
119
+ {
120
+ resolve: "gatsby-source-filesystem",
121
+ options: {
122
+ path: path.resolve(MARKETING_SETTINGS_FILE_PATH),
123
+ name: "marketingSettings"
124
+ }
125
+ },
126
+ "gatsby-plugin-image",
127
+ "gatsby-plugin-sharp",
128
+ "gatsby-transformer-sharp",
129
+ "gatsby-transformer-json",
130
+ {
131
+ resolve: "gatsby-transformer-remark",
132
+ options: {
133
+ plugins: [
134
+ {
135
+ resolve: "gatsby-remark-images",
136
+ options: {
137
+ // It"s important to specify the maxWidth (in pixels) of
138
+ // the content container as this plugin uses this as the
139
+ // base for generating different widths of each image.
140
+ maxWidth: 2048
75
141
  }
76
142
  }
77
- }
78
- },
79
- {
80
- // Add image assets before markdown or json files
81
- resolve: "gatsby-source-filesystem",
82
- options: {
83
- path: `${__dirname}/static/img`,
84
- name: "uploads"
85
- }
86
- },
87
- {
88
- // Add image assets before markdown or json files
89
- resolve: "gatsby-source-filesystem",
90
- options: {
91
- path: `${__dirname}/src/img`,
92
- name: "images"
93
- }
94
- },
95
- {
96
- // Add font assets before markdown or json files
97
- resolve: "gatsby-source-filesystem",
98
- options: {
99
- path: `${__dirname}/static/fonts`,
100
- name: "fonts"
101
- }
102
- },
103
- {
104
- resolve: "gatsby-source-filesystem",
105
- options: {
106
- path: `${__dirname}/src/pages`,
107
- name: "pages"
108
- }
109
- },
110
- {
111
- resolve: "gatsby-source-filesystem",
112
- options: {
113
- path: path.resolve(CONTENT_PAGES_DIR_PATH),
114
- name: "contentPages"
115
- }
116
- },
117
- {
118
- resolve: "gatsby-source-filesystem",
119
- options: {
120
- path: path.resolve(STATIC_CONTENT_DIR_PATH),
121
- name: "content"
122
- }
123
- },
124
- {
125
- resolve: "gatsby-source-filesystem",
126
- options: {
127
- path: path.resolve(MARKETING_SETTINGS_FILE_PATH),
128
- name: "marketingSettings"
129
- }
130
- },
131
- "gatsby-plugin-image",
132
- "gatsby-plugin-sharp",
133
- "gatsby-transformer-sharp",
134
- "gatsby-transformer-json",
135
- {
136
- resolve: "gatsby-transformer-remark",
137
- options: {
138
- plugins: [
139
- {
140
- resolve: "gatsby-remark-images",
141
- options: {
142
- // It"s important to specify the maxWidth (in pixels) of
143
- // the content container as this plugin uses this as the
144
- // base for generating different widths of each image.
145
- maxWidth: 2048
146
- }
147
- }
148
- ]
149
- }
150
- },
151
- {
152
- resolve: "gatsby-plugin-netlify-cms",
153
- options: {
154
- modulePath: `${__dirname}/src/cms/cms.js`,
155
- manualInit: true,
156
- enableIdentityWidget: false,
157
- customizeWebpackConfig: (config) => {
158
- const jsTestString = "\\.(js|mjs|jsx|ts|tsx)$";
159
- const jsTest = new RegExp(jsTestString);
160
- const jsRule = config.module.rules.find(
161
- (rule) => String(rule.test) === String(jsTest)
162
- );
163
- // is it running standalone? or is it running as a module/package?
164
- const standalone = __dirname === path.resolve();
165
- if (!standalone) {
166
- /**
167
- * Force transpiliation of solution js files; required for theming.
168
- * @see https://www.gatsbyjs.com/docs/how-to/custom-configuration/add-custom-webpack-config/#modifying-the-babel-loader
169
- */
170
- const solutionJsTest = new RegExp(`${__dirname}(.*)${jsTestString}`);
171
- const jsRuleInclude = jsRule.include;
172
- jsRule.include = (modulePath) => {
173
- if (solutionJsTest.test(modulePath)) return true;
174
- return jsRuleInclude(modulePath);
175
- }
176
- }
177
- config.module.rules = [
178
- ...config.module.rules.filter(
179
- (rule) => String(rule.test) !== String(jsTest)
180
- ),
181
- jsRule
182
- ];
183
- /**
184
- * Fixes Module not found: Error: Can"t resolve "path" bug.
185
- * Webpack 5 doesn"t include browser polyfills for node APIs by default anymore,
186
- * so we need to provide them ourselves.
187
- * @see https://github.com/postcss/postcss/issues/1509#issuecomment-772097567
188
- * @see https://github.com/gatsbyjs/gatsby/issues/31475
189
- * @see https://github.com/gatsbyjs/gatsby/issues/31179#issuecomment-844588682
143
+ ]
144
+ }
145
+ },
146
+ {
147
+ resolve: "gatsby-plugin-netlify-cms",
148
+ options: {
149
+ modulePath: `${__dirname}/src/cms/cms.js`,
150
+ manualInit: true,
151
+ enableIdentityWidget: false,
152
+ customizeWebpackConfig: (config) => {
153
+ const jsTestString = "\\.(js|mjs|jsx|ts|tsx)$";
154
+ const jsTest = new RegExp(jsTestString);
155
+ const jsRule = config.module.rules.find(
156
+ (rule) => String(rule.test) === String(jsTest)
157
+ );
158
+ // is it running standalone? or is it running as a module/package?
159
+ const standalone = __dirname === path.resolve();
160
+ if (!standalone) {
161
+ /**
162
+ * Force transpiliation of solution js files; required for theming.
163
+ * @see https://www.gatsbyjs.com/docs/how-to/custom-configuration/add-custom-webpack-config/#modifying-the-babel-loader
190
164
  */
191
- config.resolve = {
192
- ...config.resolve,
193
- fallback: {
194
- ...config.resolve.fallback,
195
- path: require.resolve("path-browserify")
196
- }
197
- };
165
+ const solutionJsTest = new RegExp(`${__dirname}(.*)${jsTestString}`);
166
+ const jsRuleInclude = jsRule.include;
167
+ jsRule.include = (modulePath) => {
168
+ if (solutionJsTest.test(modulePath)) return true;
169
+ return jsRuleInclude(modulePath);
170
+ }
198
171
  }
172
+ config.module.rules = [
173
+ ...config.module.rules.filter(
174
+ (rule) => String(rule.test) !== String(jsTest)
175
+ ),
176
+ jsRule
177
+ ];
178
+ /**
179
+ * Fixes Module not found: Error: Can"t resolve "path" bug.
180
+ * Webpack 5 doesn"t include browser polyfills for node APIs by default anymore,
181
+ * so we need to provide them ourselves.
182
+ * @see https://github.com/postcss/postcss/issues/1509#issuecomment-772097567
183
+ * @see https://github.com/gatsbyjs/gatsby/issues/31475
184
+ * @see https://github.com/gatsbyjs/gatsby/issues/31179#issuecomment-844588682
185
+ */
186
+ config.resolve = {
187
+ ...config.resolve,
188
+ fallback: {
189
+ ...config.resolve.fallback,
190
+ path: require.resolve("path-browserify")
191
+ }
192
+ };
199
193
  }
200
- },
201
- "gatsby-plugin-netlify", // make sure to keep it last in the array
202
- ],
203
- }
194
+ }
195
+ },
196
+ "gatsby-plugin-netlify", // make sure to keep it last in the array
197
+ ];
198
+
199
+ module.exports = {
200
+ siteMetadata: {
201
+ title,
202
+ description
203
+ },
204
+ plugins
205
+ };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@openeventkit/event-site",
3
3
  "description": "Event Site",
4
- "version": "2.0.75",
4
+ "version": "2.0.76",
5
5
  "author": "Tipit LLC",
6
6
  "dependencies": {
7
7
  "@mui/base": "^5.0.0-alpha.114",