@caweb/webpack 1.3.29 → 1.3.31
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.txt +6 -0
- package/package.json +2 -2
- package/plugins/html/changelog.txt +6 -0
- package/plugins/html/entry/delta.js +1 -3
- package/plugins/html/entry/eureka.js +1 -3
- package/plugins/html/entry/mono.js +1 -3
- package/plugins/html/entry/oceanside.js +1 -3
- package/plugins/html/entry/orangecounty.js +1 -3
- package/plugins/html/entry/pasorobles.js +1 -3
- package/plugins/html/entry/sacramento.js +1 -3
- package/plugins/html/entry/santabarbara.js +1 -3
- package/plugins/html/entry/santacruz.js +1 -3
- package/plugins/html/entry/shasta.js +1 -3
- package/plugins/html/entry/sierra.js +1 -3
- package/plugins/html/entry/trinity.js +1 -3
- package/plugins/html/package-lock.json +318 -315
- package/plugins/html/package.json +5 -6
- package/plugins/html/sample/search.html +1 -1
- package/plugins/html/scripts/create-entrypoints.js +0 -3
- package/plugins/html/scripts/update-scripts.js +1 -2
- package/plugins/html/webpack.config.js +2 -1
- package/plugins/html/scripts/icon.js +0 -60
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@caweb/html-webpack-plugin",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0",
|
|
4
4
|
"description": "CAWebPublishing Sample Page and Configurations",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -15,9 +15,8 @@
|
|
|
15
15
|
],
|
|
16
16
|
"scripts": {
|
|
17
17
|
"webpack": "webpack",
|
|
18
|
-
"postbuild": "npm run create-entrypoint
|
|
18
|
+
"postbuild": "npm run create-entrypoint",
|
|
19
19
|
"create-entrypoint": "node ./scripts/create-entrypoints.js",
|
|
20
|
-
"generate-json": "node ./scripts/icon.js",
|
|
21
20
|
"update-scripts": "node ./scripts/update-scripts.js",
|
|
22
21
|
"new-scheme": "node ./scripts/schemes.js",
|
|
23
22
|
"remove-scheme": "node ./scripts/schemes.js -r",
|
|
@@ -106,20 +105,20 @@
|
|
|
106
105
|
},
|
|
107
106
|
"homepage": "https://github.com/CAWebPublishing/webpack/plugins/html#readme",
|
|
108
107
|
"devDependencies": {
|
|
109
|
-
"@inquirer/prompts": "^7.
|
|
108
|
+
"@inquirer/prompts": "^7.4.0",
|
|
110
109
|
"animate.css": "^4.1.1",
|
|
111
110
|
"bootstrap": "^5.3.3",
|
|
112
111
|
"bootstrap-forced-colors-css": "^1.0.7",
|
|
113
112
|
"chalk": "^5.4.1",
|
|
114
113
|
"cross-spawn": "^7.0.6",
|
|
115
|
-
"fast-xml-parser": "^5.0.
|
|
114
|
+
"fast-xml-parser": "^5.0.9",
|
|
116
115
|
"mini-css-extract-plugin": "^2.9.2"
|
|
117
116
|
},
|
|
118
117
|
"dependencies": {
|
|
119
118
|
"@caweb/a11y-webpack-plugin": "^1.0.9",
|
|
120
119
|
"@caweb/css-audit-webpack-plugin": "^1.0.12",
|
|
121
120
|
"@caweb/jshint-webpack-plugin": "^2.0.1",
|
|
122
|
-
"@wordpress/scripts": "^30.
|
|
121
|
+
"@wordpress/scripts": "^30.13.0",
|
|
123
122
|
"css-minimizer-webpack-plugin": "^7.0.2",
|
|
124
123
|
"handlebars-loader": "^1.7.3",
|
|
125
124
|
"html-webpack-link-type-plugin": "^1.1.1",
|
|
@@ -10,7 +10,6 @@ import { fileURLToPath } from 'url';
|
|
|
10
10
|
const currentPath = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
|
|
11
11
|
|
|
12
12
|
let entry = {
|
|
13
|
-
'font-only': path.join(currentPath, 'src', 'styles', 'font-only.css')
|
|
14
13
|
};
|
|
15
14
|
|
|
16
15
|
// create the entry directory
|
|
@@ -25,7 +24,6 @@ let heading = `/**
|
|
|
25
24
|
fs.readdirSync(path.join(currentPath, 'src', 'styles', 'colorschemes')).forEach((c) => {
|
|
26
25
|
let scheme = c.substring(0, c.indexOf('.')).replace(' ', '');
|
|
27
26
|
let files = [
|
|
28
|
-
path.join(currentPath, 'src', 'styles', 'font-only.css'),
|
|
29
27
|
path.join(currentPath, 'src', 'styles', 'colorschemes', c),
|
|
30
28
|
path.join(currentPath, 'src', 'scripts', 'index.js')
|
|
31
29
|
]
|
|
@@ -40,7 +38,6 @@ const currentPath = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '
|
|
|
40
38
|
|
|
41
39
|
export default {
|
|
42
40
|
entry: {
|
|
43
|
-
'font-only': path.join(currentPath, 'src', 'styles', 'font-only.css'),
|
|
44
41
|
${scheme}: [
|
|
45
42
|
path.join(currentPath, ${correctFiles.join('),\n' + `\t`.repeat(3) + 'path.join(currentPath, ')})
|
|
46
43
|
]
|
|
@@ -11,9 +11,8 @@ const pkg = JSON.parse( fs.readFileSync(path.resolve('package.json')) );
|
|
|
11
11
|
|
|
12
12
|
let scripts = {
|
|
13
13
|
"webpack": "webpack",
|
|
14
|
-
"postbuild": "npm run create-entrypoint
|
|
14
|
+
"postbuild": "npm run create-entrypoint",
|
|
15
15
|
"create-entrypoint": "node ./scripts/create-entrypoints.js",
|
|
16
|
-
"generate-json": "node ./scripts/icon.js",
|
|
17
16
|
"update-scripts": "node ./scripts/update-scripts.js",
|
|
18
17
|
"new-scheme": "node ./scripts/schemes.js",
|
|
19
18
|
"remove-scheme": "node ./scripts/schemes.js -r",
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* External dependencies
|
|
5
|
-
*/
|
|
6
|
-
import fs from 'fs';
|
|
7
|
-
import path from 'path';
|
|
8
|
-
import { fileURLToPath } from 'url';
|
|
9
|
-
|
|
10
|
-
const currentPath = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
|
|
11
|
-
const fontBuildPath = path.join(currentPath, 'build', 'fonts');
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
// iterate over all svg files
|
|
15
|
-
fs.readdirSync(fontBuildPath).filter( (e) => e.endsWith('.svg')).forEach((c) => {
|
|
16
|
-
|
|
17
|
-
// we can't use a parser otherwise some of the unicodes will be encoded
|
|
18
|
-
// we parse the file ourselves.
|
|
19
|
-
let svgContent = fs.readFileSync(path.join(fontBuildPath, c)).toString();
|
|
20
|
-
|
|
21
|
-
// we only want the glyph with unicodes
|
|
22
|
-
let icons = [ ...svgContent.matchAll(/glyph unicode=[^\n].*/g) ].map((i) => {
|
|
23
|
-
let raw = i[0];
|
|
24
|
-
let glyph = raw.match(/glyph-name="([\S]+)"/);
|
|
25
|
-
|
|
26
|
-
// only if there is a name associated with the glyph.
|
|
27
|
-
if( glyph ){
|
|
28
|
-
|
|
29
|
-
let unicode = raw.match(/unicode="([\S]+)"/)[1];
|
|
30
|
-
let name = glyph[1];
|
|
31
|
-
let ws = name.replace(/[_-]/g, ' ').split(' ');
|
|
32
|
-
|
|
33
|
-
// the styles is applied by certain editors/builders
|
|
34
|
-
// divi - Applies Divi Theme Support
|
|
35
|
-
// line - Applies Line Styles
|
|
36
|
-
// solid - Applied Solid Styles
|
|
37
|
-
let styles = [
|
|
38
|
-
'divi',
|
|
39
|
-
ws.includes('line') ? 'line' : 'solid'
|
|
40
|
-
]
|
|
41
|
-
|
|
42
|
-
return {
|
|
43
|
-
glyph: name,
|
|
44
|
-
unicode,
|
|
45
|
-
name: ws.map(w => w.charAt(0).toUpperCase() + w.substring(1)).join(' '), // uppercase all words and join with a space
|
|
46
|
-
search_terms: ws.join(' '),
|
|
47
|
-
styles
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
}).filter(e=>e); // clear out any null values
|
|
53
|
-
|
|
54
|
-
// write svg json output
|
|
55
|
-
fs.writeFileSync(
|
|
56
|
-
path.join(fontBuildPath, `${c.substring(0, c.lastIndexOf('.'))}.json`),
|
|
57
|
-
JSON.stringify( icons, null, 4 )
|
|
58
|
-
)
|
|
59
|
-
|
|
60
|
-
})
|