gatsby-theme-q3 2.3.6 → 2.3.10

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,38 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [2.3.10](https://github.com/3merge/q/compare/v2.3.9...v2.3.10) (2022-01-18)
7
+
8
+ **Note:** Version bump only for package gatsby-theme-q3
9
+
10
+
11
+
12
+
13
+
14
+ ## [2.3.9](https://github.com/3merge/q/compare/v2.3.8...v2.3.9) (2022-01-17)
15
+
16
+ **Note:** Version bump only for package gatsby-theme-q3
17
+
18
+
19
+
20
+
21
+
22
+ ## [2.3.8](https://github.com/3merge/q/compare/v2.3.7...v2.3.8) (2022-01-10)
23
+
24
+ **Note:** Version bump only for package gatsby-theme-q3
25
+
26
+
27
+
28
+
29
+
30
+ ## [2.3.7](https://github.com/3merge/q/compare/v2.3.6...v2.3.7) (2021-12-16)
31
+
32
+ **Note:** Version bump only for package gatsby-theme-q3
33
+
34
+
35
+
36
+
37
+
6
38
  ## [2.3.6](https://github.com/3merge/q/compare/v2.3.5...v2.3.6) (2021-12-16)
7
39
 
8
40
  **Note:** Version bump only for package gatsby-theme-q3
package/gatsby-node.js CHANGED
@@ -14,7 +14,36 @@ exports.onCreateWebpackConfig = ({
14
14
  });
15
15
 
16
16
  actions.setWebpackConfig({
17
+ module: {
18
+ rules: [
19
+ {
20
+ test: /\.ts$/,
21
+ use: ['ts-loader'],
22
+ },
23
+ {
24
+ test: /unicode-properties[/\\]unicode-properties/,
25
+ use: ['transform-loader?brfs'],
26
+ },
27
+ {
28
+ test: /pdfkit[/\\]js[/\\]/,
29
+ use: ['transform-loader?brfs'],
30
+ },
31
+ {
32
+ test: /fontkit[/\\]index.js$/,
33
+ use: ['transform-loader?brfs'],
34
+ },
35
+ {
36
+ test: /linebreak[/\\]src[/\\]linebreaker.js/,
37
+ use: ['transform-loader?brfs'],
38
+ },
39
+ ],
40
+ },
17
41
  resolve: {
42
+ alias: {
43
+ 'unicode-properties':
44
+ 'unicode-properties/unicode-properties.cjs.js',
45
+ pdfkit: 'pdfkit/js/pdfkit.js',
46
+ },
18
47
  fallback: {
19
48
  util: false,
20
49
  fs: false,
package/helpers/setup.js CHANGED
@@ -4,17 +4,25 @@ const { compact, get } = require('lodash');
4
4
  const loadContent = require('./loadContent');
5
5
  const loadTheme = require('./loadTheme');
6
6
 
7
- const getFile = (possibleFileNames = []) =>
8
- possibleFileNames.reduce((acc, curr) => {
9
- if (acc) return acc;
10
- const filename = path.resolve(process.cwd(), curr);
11
- return fs.existsSync(filename) ? filename : undefined;
12
- }, undefined);
7
+ const getFile =
8
+ (directory) =>
9
+ (possibleFileNames = []) =>
10
+ possibleFileNames.reduce((acc, curr) => {
11
+ if (acc) return acc;
12
+ const filename = path.resolve(directory, curr);
13
+ return fs.existsSync(filename) ? filename : undefined;
14
+ }, undefined);
13
15
 
14
- module.exports = (siteMetadata, plugins = []) => {
15
- const locale = loadContent(getFile(['locale', 'lang']));
16
+ module.exports = (
17
+ siteMetadata,
18
+ plugins = [],
19
+ workingDirection = process.cwd(),
20
+ ) => {
21
+ const f = getFile(workingDirection);
22
+
23
+ const locale = loadContent(f(['locale', 'lang']));
16
24
  const theme = loadTheme(
17
- getFile(['theme.js', 'gatsby-theme.js', 'mui.js']),
25
+ f(['theme.js', 'gatsby-theme.js', 'mui.js']),
18
26
  );
19
27
 
20
28
  return {
@@ -30,7 +38,7 @@ module.exports = (siteMetadata, plugins = []) => {
30
38
  {
31
39
  resolve: 'gatsby-theme-q3',
32
40
  options: {
33
- icon: getFile([
41
+ icon: f([
34
42
  'static/favicon.png',
35
43
  'static/favicon.jpg',
36
44
  ]),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gatsby-theme-q3",
3
- "version": "2.3.6",
3
+ "version": "2.3.10",
4
4
  "main": "index.js",
5
5
  "license": "MIT",
6
6
  "peerDependencies": {
@@ -30,17 +30,17 @@
30
30
  "gatsby-plugin-sharp": "^4.2.0",
31
31
  "gatsby-plugin-sitemap": "^5.2.0",
32
32
  "gatsby-source-contentful": "^7.0.0",
33
- "gatsby-theme-q3-mui": "^2.3.6",
33
+ "gatsby-theme-q3-mui": "^2.3.10",
34
34
  "gatsby-transformer-sharp": "^4.2.0",
35
35
  "lodash": "^4.17.20",
36
36
  "process": "^0.11.10",
37
37
  "prop-types": "^15.7.2",
38
- "q3-ui-locale": "^2.3.2",
38
+ "q3-ui-locale": "^2.3.9",
39
39
  "query-string": "^7.0.1",
40
40
  "react-share": "^4.3.1",
41
41
  "slugify": "^1.6.3",
42
42
  "transform-loader": "^0.2.4",
43
43
  "yarn": "^1.22.17"
44
44
  },
45
- "gitHead": "11349608dcc4da10f9e2875be6ae23823b8c6d4d"
45
+ "gitHead": "5a6f1c01cded9e3a96f41109d6061519f1adea06"
46
46
  }