mod-build 4.0.83-beta.4 → 4.0.83-beta.5
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.
- package/CHANGELOG.md +5 -1
- package/package.json +1 -1
- package/tasks/clean.js +4 -4
- package/tasks/grab-global-fonts.js +1 -2
- package/tasks/grab-jsdoc.js +1 -1
- package/tasks/serve.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## 4.0.
|
|
3
|
+
## 4.0.84
|
|
4
4
|
|
|
5
5
|
- Updated `grab-global-fonts` task to grab fonts from `gwfh.mranftl.com/api/fonts` -- will default to `Roboto` unless defined in `siteconfig.js` = `fontsToDownload: ['font-name']`
|
|
6
6
|
|
|
7
|
+
## 4.0.83
|
|
8
|
+
|
|
9
|
+
- Updated `grab-jsdoc` task to use correct resource path for mod-form
|
|
10
|
+
|
|
7
11
|
## 4.0.82
|
|
8
12
|
|
|
9
13
|
- Added `grab-global-fonts` task to grab Roboto + Montserrat font files from mod-site
|
package/package.json
CHANGED
package/tasks/clean.js
CHANGED
|
@@ -13,20 +13,20 @@ const fontFoldersToDelete = fs.existsSync(fontBaseFolder)
|
|
|
13
13
|
|
|
14
14
|
const foldersToDelete = [...baseFoldersToDelete, ...fontFoldersToDelete];
|
|
15
15
|
|
|
16
|
-
foldersToDelete.
|
|
16
|
+
await Promise.all(foldersToDelete.map(async (folder) => {
|
|
17
17
|
try {
|
|
18
18
|
await fs.promises.rm(folder, { recursive: true });
|
|
19
19
|
console.log(`Folder ${folder} deleted successfully`);
|
|
20
20
|
} catch (err) {
|
|
21
21
|
// fail silently
|
|
22
22
|
}
|
|
23
|
-
});
|
|
23
|
+
}));
|
|
24
24
|
|
|
25
|
-
filesToDelete.
|
|
25
|
+
await Promise.all(filesToDelete.map(async (file) => {
|
|
26
26
|
try {
|
|
27
27
|
await fs.promises.rm(file);
|
|
28
28
|
console.log(`File ${file} deleted successfully`);
|
|
29
29
|
} catch (err) {
|
|
30
30
|
// fail silently
|
|
31
31
|
}
|
|
32
|
-
});
|
|
32
|
+
}));
|
|
@@ -46,7 +46,6 @@ const getFontDownloadUrls = async (fontName) => {
|
|
|
46
46
|
if (variant.fontStyle === 'normal' && targetWeights.includes(variant.fontWeight)) {
|
|
47
47
|
const variantName = variant.fontWeight === '400' ? 'regular' : 'bold';
|
|
48
48
|
downloadUrls[variantName] = downloadUrls[variantName] || {};
|
|
49
|
-
|
|
50
49
|
if (variant.ttf) {
|
|
51
50
|
downloadUrls[variantName].ttf = variant.ttf;
|
|
52
51
|
}
|
|
@@ -131,7 +130,7 @@ const downloadFont = async (fontName) => {
|
|
|
131
130
|
|
|
132
131
|
const updateGitignore = async (fontNames) => {
|
|
133
132
|
const fontEntries = fontNames.map(fontName => `${getFontPath(fontName)}/`);
|
|
134
|
-
await addFilesToGitignore(fontEntries, '
|
|
133
|
+
await addFilesToGitignore(fontEntries, 'Downloaded fonts');
|
|
135
134
|
};
|
|
136
135
|
|
|
137
136
|
// If a site has a branded font that is outside of this API - we should add it to /public/fonts/branded/{fontName}/*
|
package/tasks/grab-jsdoc.js
CHANGED
|
@@ -7,7 +7,7 @@ import path from 'node:path';
|
|
|
7
7
|
import { responseInterceptor } from '../src/scripts/retry-axios.js';
|
|
8
8
|
import addFilesToGitignore from './add-files-to-gitignore.js';
|
|
9
9
|
|
|
10
|
-
const resourcePath = 'quote/resources/mod-form
|
|
10
|
+
const resourcePath = 'quote/resources/mod-form';
|
|
11
11
|
const axiosInstance = axios.create();
|
|
12
12
|
const jsdocAxiosInstance = axios.create();
|
|
13
13
|
responseInterceptor(axiosInstance);
|
package/tasks/serve.js
CHANGED
|
@@ -13,7 +13,7 @@ import { createStylelintFile, updateConfig } from '../src/scripts/plugins.js';
|
|
|
13
13
|
export async function startModBuild(config) {
|
|
14
14
|
addEditorConfig();
|
|
15
15
|
createStylelintFile();
|
|
16
|
-
grabGlobalFonts(config);
|
|
16
|
+
await grabGlobalFonts(config);
|
|
17
17
|
await grabB2BData(config);
|
|
18
18
|
await grabCdn(config);
|
|
19
19
|
await getDefaultTradeQuestions(config);
|