@caweb/webpack 1.2.28 → 1.3.0
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/.github/workflows/config-publish.yml +33 -0
- package/.github/workflows/plugins-publish.yml +45 -0
- package/.github/workflows/test +29 -0
- package/.gitmodules +3 -0
- package/README.md +1 -2
- package/changelog.txt +137 -0
- package/package.json +9 -16
- package/plugins/a11y/README.md +19 -0
- package/plugins/a11y/aceconfig.js +44 -0
- package/plugins/a11y/changelog.txt +31 -0
- package/plugins/a11y/index.js +271 -0
- package/plugins/a11y/package-lock.json +3303 -0
- package/plugins/a11y/package.json +42 -0
- package/plugins/css-audit/README.md +20 -0
- package/plugins/css-audit/changelog.txt +41 -0
- package/plugins/css-audit/css-audit.config.cjs +5 -0
- package/plugins/css-audit/default.config.js +19 -0
- package/plugins/css-audit/index.js +326 -0
- package/plugins/css-audit/package-lock.json +1522 -0
- package/plugins/css-audit/package.json +53 -0
- package/plugins/css-audit/sample/no-files.html +9 -0
- package/plugins/html/README.md +40 -0
- package/plugins/html/changelog.txt +134 -0
- package/plugins/html/entry/delta.js +20 -0
- package/plugins/html/entry/eureka.js +20 -0
- package/plugins/html/entry/mono.js +20 -0
- package/plugins/html/entry/oceanside.js +20 -0
- package/plugins/html/entry/orangecounty.js +20 -0
- package/plugins/html/entry/pasorobles.js +20 -0
- package/plugins/html/entry/sacramento.js +20 -0
- package/plugins/html/entry/santabarbara.js +20 -0
- package/plugins/html/entry/santacruz.js +20 -0
- package/plugins/html/entry/shasta.js +20 -0
- package/plugins/html/entry/sierra.js +20 -0
- package/plugins/html/entry/trinity.js +20 -0
- package/plugins/html/index.js +96 -0
- package/plugins/html/package-lock.json +21977 -0
- package/plugins/html/package.json +70 -0
- package/plugins/html/sample/blank.html +13 -0
- package/plugins/html/sample/components/alerts.html +32 -0
- package/plugins/html/sample/components/animations.html +7 -0
- package/plugins/html/sample/components/buttons.html +5 -0
- package/plugins/html/sample/components/cards.html +73 -0
- package/plugins/html/sample/components/lists.html +75 -0
- package/plugins/html/sample/components/locations.html +49 -0
- package/plugins/html/sample/components/profile-banners.html +48 -0
- package/plugins/html/sample/components/sections.html +16 -0
- package/plugins/html/sample/components/service-tiles.html +73 -0
- package/plugins/html/sample/components/typography.html +42 -0
- package/plugins/html/sample/default.html +31 -0
- package/plugins/html/sample/favicon.ico +0 -0
- package/plugins/html/sample/images/black_puppy.jpg +0 -0
- package/plugins/html/sample/images/dolphin_marine_mammals_water.jpg +0 -0
- package/plugins/html/sample/images/grayscale_mountain.jpg +0 -0
- package/plugins/html/sample/images/silhouette.png +0 -0
- package/plugins/html/sample/images/squirrel_tail_bushy_tail.jpg +0 -0
- package/plugins/html/sample/index.html +48 -0
- package/plugins/html/sample/missing/content.html +4 -0
- package/plugins/html/sample/structural/branding.html +15 -0
- package/plugins/html/sample/structural/footer.html +47 -0
- package/plugins/html/sample/structural/header.html +16 -0
- package/plugins/html/sample/structural/mobile-controls.html +5 -0
- package/plugins/html/sample/structural/navigation.html +26 -0
- package/plugins/html/sample/structural/search.html +15 -0
- package/plugins/html/sample/structural/utility-header.html +23 -0
- package/plugins/html/scripts/create-entrypoints.js +62 -0
- package/plugins/html/scripts/icon.js +60 -0
- package/plugins/html/scripts/webpack.test.js +41 -0
- package/plugins/html/webpack.config.js +279 -0
- package/plugins/jshint/.jshintrc +31 -0
- package/plugins/jshint/README.md +26 -0
- package/plugins/jshint/changelog.txt +30 -0
- package/plugins/jshint/index.js +296 -0
- package/plugins/jshint/package-lock.json +1779 -0
- package/plugins/jshint/package.json +45 -0
- package/plugins/jshint/reporter.cjs +663 -0
- package/plugins/jshint/sample/jshint.css +247 -0
- package/plugins/jshint/sample/jshint.html +7 -0
- package/plugins/jshint/sample/jshint.js +25 -0
- package/plugins/jshint/sample/no-files.html +9 -0
- package/sample/index.html +364 -0
- package/scripts/update-deps.js +38 -0
- package/webpack.config.js +0 -54
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@caweb/css-audit-webpack-plugin",
|
|
3
|
+
"version": "1.0.12",
|
|
4
|
+
"description": "CAWebPublishing Webpack Plugin to run WordPress CSS Audit",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "index.js",
|
|
7
|
+
"bin": {
|
|
8
|
+
"auditor": "bin/auditor/index.js"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"bin",
|
|
12
|
+
"sample",
|
|
13
|
+
"css-audit.config.cjs",
|
|
14
|
+
"default.config.js",
|
|
15
|
+
"index.js",
|
|
16
|
+
"README.md"
|
|
17
|
+
],
|
|
18
|
+
"author": "CAWebPublishing",
|
|
19
|
+
"license": "ISC",
|
|
20
|
+
"bugs": {
|
|
21
|
+
"url": "https://github.com/CAWebPublishing/webpack/issues"
|
|
22
|
+
},
|
|
23
|
+
"publishConfig": {
|
|
24
|
+
"access": "public"
|
|
25
|
+
},
|
|
26
|
+
"homepage": "https://github.com/CAWebPublishing/webpack#readme",
|
|
27
|
+
"repository": {
|
|
28
|
+
"type": "git",
|
|
29
|
+
"url": "https://github.com/CAWebPublishing/webpack",
|
|
30
|
+
"directory": "plugins/css-audit"
|
|
31
|
+
},
|
|
32
|
+
"keywords": [
|
|
33
|
+
"caweb",
|
|
34
|
+
"cagov",
|
|
35
|
+
"webpack"
|
|
36
|
+
],
|
|
37
|
+
"scripts": {
|
|
38
|
+
"webpack": "webpack",
|
|
39
|
+
"postinstall": "cd bin/auditor && npm ci",
|
|
40
|
+
"test": "echo \"Error: run tests from root\" && exit 0"
|
|
41
|
+
},
|
|
42
|
+
"dependencies": {
|
|
43
|
+
"chalk": "^5.3.0",
|
|
44
|
+
"cross-spawn": "^7.0.3",
|
|
45
|
+
"deepmerge": "^4.3.1",
|
|
46
|
+
"get-all-files": "^5.0.0",
|
|
47
|
+
"resolve-bin": "^1.0.1"
|
|
48
|
+
},
|
|
49
|
+
"devDependencies": {
|
|
50
|
+
"webpack": "^5.96.1",
|
|
51
|
+
"webpack-cli": "^5.1.4"
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
This plugin utilizes the HTML Webpack Plugin to launch static generated pages using the CAWeb Template (formerly the California State Template)
|
|
2
|
+
|
|
3
|
+
<i>This package is inspired by [wp-scripts](https://www.npmjs.com/package/@wordpress/scripts)</i>
|
|
4
|
+
|
|
5
|
+
## Plugins Used
|
|
6
|
+
- [html-webpack-plugin](https://www.npmjs.com/package/html-webpack-plugin)
|
|
7
|
+
|
|
8
|
+
## Installation
|
|
9
|
+
<pre>npm install --save-dev @caweb/html-webpack-plugin</pre>
|
|
10
|
+
|
|
11
|
+
## Get Started
|
|
12
|
+
In your Webpack configuration simply add the plugin to your existing plugin array.
|
|
13
|
+
|
|
14
|
+
<pre>
|
|
15
|
+
import CAWebHTMLPlugin from '@caweb/html-webpack-plugin';
|
|
16
|
+
|
|
17
|
+
export default {
|
|
18
|
+
plugins: [
|
|
19
|
+
new CAWebHTMLPlugin()
|
|
20
|
+
]
|
|
21
|
+
}
|
|
22
|
+
</pre>
|
|
23
|
+
|
|
24
|
+
## Options
|
|
25
|
+
All html-webpack-plugin [options](https://github.com/jantimon/html-webpack-plugin?tab=readme-ov-file#options) are available along with the following:
|
|
26
|
+
<code>template</code> - blank or default, Default will launch a site with a templated header/footer area, blank will not.
|
|
27
|
+
<code>scheme</code> - Colorscheme to utilitze.
|
|
28
|
+
**Available schemes:**
|
|
29
|
+
* delta
|
|
30
|
+
* eureka
|
|
31
|
+
* mono
|
|
32
|
+
* oceanside
|
|
33
|
+
* orangecounty
|
|
34
|
+
* pasorobles
|
|
35
|
+
* sacramento
|
|
36
|
+
* santabarbara
|
|
37
|
+
* santacruz
|
|
38
|
+
* shasta
|
|
39
|
+
* sierra
|
|
40
|
+
* trinity
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
v1.5.1
|
|
2
|
+
- updated npm packages
|
|
3
|
+
- Changed mobile control structure, navigation and search are now in the mobile overlay
|
|
4
|
+
- Added logic for header/footer nav, social share links, utility links, Google Search ID, template parameters passable via caweb.json
|
|
5
|
+
- Webpack configuration from @caweb/webpack package moved into this configuration
|
|
6
|
+
- Webpack config handles --mode flag appropriately
|
|
7
|
+
- Webpack config now exports multiple configurations
|
|
8
|
+
- Webpack configuration now outputs minified files
|
|
9
|
+
|
|
10
|
+
v1.5.0
|
|
11
|
+
- Template parameters alerts, logo, passable via caweb.json
|
|
12
|
+
- Added logic for alerts, logo
|
|
13
|
+
|
|
14
|
+
v1.4.17
|
|
15
|
+
- Fixed issue with alerts rendering in mobile
|
|
16
|
+
|
|
17
|
+
v1.4.16
|
|
18
|
+
- Fixed issue with Card Standout triangle not centering properly
|
|
19
|
+
|
|
20
|
+
v1.4.15
|
|
21
|
+
- Removed selector false from test script
|
|
22
|
+
- Fixed issue with search and navigation flickering when loaded on mobile
|
|
23
|
+
|
|
24
|
+
v1.4.14
|
|
25
|
+
- Font weight variables removed
|
|
26
|
+
- Side navigation List and Step Lists styles added back to lists
|
|
27
|
+
- Fixed issue with mobile controls
|
|
28
|
+
|
|
29
|
+
v1.4.13
|
|
30
|
+
- Dark mode script turned off
|
|
31
|
+
|
|
32
|
+
v1.4.12
|
|
33
|
+
- Updated ca-gov-logo-svg
|
|
34
|
+
- Added link grid styles back
|
|
35
|
+
- Added breadcrumbs styles back
|
|
36
|
+
- Added side-navigation styles back
|
|
37
|
+
|
|
38
|
+
v1.4.11
|
|
39
|
+
- Added cursor- utility classes
|
|
40
|
+
|
|
41
|
+
v1.4.10
|
|
42
|
+
- Unnested search styles
|
|
43
|
+
|
|
44
|
+
v1.4.9
|
|
45
|
+
- Fixed issue with page-title,page-date not styling like containers
|
|
46
|
+
- Fixed issue with executive profiles dark text
|
|
47
|
+
- Fixed issue with understated card header color
|
|
48
|
+
|
|
49
|
+
v1.4.8
|
|
50
|
+
- Increased font size for Service Tile more button
|
|
51
|
+
|
|
52
|
+
v1.4.7
|
|
53
|
+
- Fixed issue with Service Tile more button
|
|
54
|
+
|
|
55
|
+
v1.4.6
|
|
56
|
+
- Removed margin-bottom from headings
|
|
57
|
+
- Fixed issue with social-share-colors
|
|
58
|
+
- Added new dark theme support for High Contrast Mode
|
|
59
|
+
|
|
60
|
+
v1.4.5
|
|
61
|
+
- Fixed issue with project sample favicon not picking up
|
|
62
|
+
|
|
63
|
+
v1.4.4
|
|
64
|
+
- External link now apply to all links with target = _blank
|
|
65
|
+
|
|
66
|
+
v1.4.3
|
|
67
|
+
- Dropdown nav menu width set to auto
|
|
68
|
+
- Removed background color from location banner more details button
|
|
69
|
+
|
|
70
|
+
v1.4.2
|
|
71
|
+
- Added sample images
|
|
72
|
+
- Test template was removed
|
|
73
|
+
- Updated test scripts
|
|
74
|
+
- Updated template files
|
|
75
|
+
|
|
76
|
+
v1.4.1
|
|
77
|
+
- Added gray-50 to bootstrap gray mapping
|
|
78
|
+
- Added background color to footer
|
|
79
|
+
|
|
80
|
+
v1.4.0
|
|
81
|
+
- Added new test template and sample files
|
|
82
|
+
- Template source files have been completely redone
|
|
83
|
+
- Added Animate.css https://animate.style/
|
|
84
|
+
- Added Bootstrap Forced Colors CSS https://www.npmjs.com/package/bootstrap-forced-colors-css
|
|
85
|
+
- Updated npm packages
|
|
86
|
+
- Added html-webpack-link-type-plugin
|
|
87
|
+
|
|
88
|
+
v1.3.3
|
|
89
|
+
- Updated Readme
|
|
90
|
+
|
|
91
|
+
v1.3.2
|
|
92
|
+
- Removed extra year from footer sample
|
|
93
|
+
- Added new font json script file
|
|
94
|
+
- Updated npm packages
|
|
95
|
+
|
|
96
|
+
v1.3.1
|
|
97
|
+
- Updated icon font library
|
|
98
|
+
- Moved icon font out of components directory
|
|
99
|
+
- Updated entrypoints to generate font-only sheet
|
|
100
|
+
|
|
101
|
+
v1.3.0
|
|
102
|
+
- Remediated State Template 6.3.2 source files
|
|
103
|
+
|
|
104
|
+
v1.2.2
|
|
105
|
+
- Added favicon to default
|
|
106
|
+
|
|
107
|
+
v1.2.1
|
|
108
|
+
- Removed console messages
|
|
109
|
+
|
|
110
|
+
v1.2.0
|
|
111
|
+
- Added new CAWebHTMLPlugin class which extends HtmlWebpackPlugin
|
|
112
|
+
- Moved @wordpress/scripts defaults to base configurations
|
|
113
|
+
|
|
114
|
+
v1.1.2
|
|
115
|
+
- Renamed index.html to blank.html to match args
|
|
116
|
+
|
|
117
|
+
v1.1.1
|
|
118
|
+
- Rolled changes back to index.html
|
|
119
|
+
- Added default.html for templating
|
|
120
|
+
|
|
121
|
+
v1.1.0
|
|
122
|
+
- Added State Template 6.3.2 source files
|
|
123
|
+
- Added script to generate multiple entrypoints for use when serving
|
|
124
|
+
- Added webconfig for multiple entrypoints based on colorschemes
|
|
125
|
+
- Added header/footer initial structural markup
|
|
126
|
+
|
|
127
|
+
v1.0.2
|
|
128
|
+
- Added content to template parameters
|
|
129
|
+
|
|
130
|
+
v1.0.1
|
|
131
|
+
- Added Page Template to HTML Plugin
|
|
132
|
+
|
|
133
|
+
v1.0.0
|
|
134
|
+
- Initial CAWeb HTML Webpack Plugin added
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Autogenerated Entrypoint
|
|
3
|
+
* DO NOT MODIFY
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import path from 'path';
|
|
7
|
+
import { fileURLToPath } from 'url';
|
|
8
|
+
const currentPath = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
|
|
9
|
+
|
|
10
|
+
export default {
|
|
11
|
+
entry: {
|
|
12
|
+
'font-only': path.join(currentPath, 'src', 'styles', 'font-only.css'),
|
|
13
|
+
delta: [
|
|
14
|
+
path.join(currentPath, '/src/styles/font-only.css'),
|
|
15
|
+
path.join(currentPath, '/src/styles/colorschemes/delta.scss'),
|
|
16
|
+
path.join(currentPath, '/src/scripts/index.js')
|
|
17
|
+
]
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Autogenerated Entrypoint
|
|
3
|
+
* DO NOT MODIFY
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import path from 'path';
|
|
7
|
+
import { fileURLToPath } from 'url';
|
|
8
|
+
const currentPath = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
|
|
9
|
+
|
|
10
|
+
export default {
|
|
11
|
+
entry: {
|
|
12
|
+
'font-only': path.join(currentPath, 'src', 'styles', 'font-only.css'),
|
|
13
|
+
eureka: [
|
|
14
|
+
path.join(currentPath, '/src/styles/font-only.css'),
|
|
15
|
+
path.join(currentPath, '/src/styles/colorschemes/eureka.scss'),
|
|
16
|
+
path.join(currentPath, '/src/scripts/index.js')
|
|
17
|
+
]
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Autogenerated Entrypoint
|
|
3
|
+
* DO NOT MODIFY
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import path from 'path';
|
|
7
|
+
import { fileURLToPath } from 'url';
|
|
8
|
+
const currentPath = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
|
|
9
|
+
|
|
10
|
+
export default {
|
|
11
|
+
entry: {
|
|
12
|
+
'font-only': path.join(currentPath, 'src', 'styles', 'font-only.css'),
|
|
13
|
+
mono: [
|
|
14
|
+
path.join(currentPath, '/src/styles/font-only.css'),
|
|
15
|
+
path.join(currentPath, '/src/styles/colorschemes/mono.scss'),
|
|
16
|
+
path.join(currentPath, '/src/scripts/index.js')
|
|
17
|
+
]
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Autogenerated Entrypoint
|
|
3
|
+
* DO NOT MODIFY
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import path from 'path';
|
|
7
|
+
import { fileURLToPath } from 'url';
|
|
8
|
+
const currentPath = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
|
|
9
|
+
|
|
10
|
+
export default {
|
|
11
|
+
entry: {
|
|
12
|
+
'font-only': path.join(currentPath, 'src', 'styles', 'font-only.css'),
|
|
13
|
+
oceanside: [
|
|
14
|
+
path.join(currentPath, '/src/styles/font-only.css'),
|
|
15
|
+
path.join(currentPath, '/src/styles/colorschemes/oceanside.scss'),
|
|
16
|
+
path.join(currentPath, '/src/scripts/index.js')
|
|
17
|
+
]
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Autogenerated Entrypoint
|
|
3
|
+
* DO NOT MODIFY
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import path from 'path';
|
|
7
|
+
import { fileURLToPath } from 'url';
|
|
8
|
+
const currentPath = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
|
|
9
|
+
|
|
10
|
+
export default {
|
|
11
|
+
entry: {
|
|
12
|
+
'font-only': path.join(currentPath, 'src', 'styles', 'font-only.css'),
|
|
13
|
+
orangecounty: [
|
|
14
|
+
path.join(currentPath, '/src/styles/font-only.css'),
|
|
15
|
+
path.join(currentPath, '/src/styles/colorschemes/orangecounty.scss'),
|
|
16
|
+
path.join(currentPath, '/src/scripts/index.js')
|
|
17
|
+
]
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Autogenerated Entrypoint
|
|
3
|
+
* DO NOT MODIFY
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import path from 'path';
|
|
7
|
+
import { fileURLToPath } from 'url';
|
|
8
|
+
const currentPath = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
|
|
9
|
+
|
|
10
|
+
export default {
|
|
11
|
+
entry: {
|
|
12
|
+
'font-only': path.join(currentPath, 'src', 'styles', 'font-only.css'),
|
|
13
|
+
pasorobles: [
|
|
14
|
+
path.join(currentPath, '/src/styles/font-only.css'),
|
|
15
|
+
path.join(currentPath, '/src/styles/colorschemes/pasorobles.scss'),
|
|
16
|
+
path.join(currentPath, '/src/scripts/index.js')
|
|
17
|
+
]
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Autogenerated Entrypoint
|
|
3
|
+
* DO NOT MODIFY
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import path from 'path';
|
|
7
|
+
import { fileURLToPath } from 'url';
|
|
8
|
+
const currentPath = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
|
|
9
|
+
|
|
10
|
+
export default {
|
|
11
|
+
entry: {
|
|
12
|
+
'font-only': path.join(currentPath, 'src', 'styles', 'font-only.css'),
|
|
13
|
+
sacramento: [
|
|
14
|
+
path.join(currentPath, '/src/styles/font-only.css'),
|
|
15
|
+
path.join(currentPath, '/src/styles/colorschemes/sacramento.scss'),
|
|
16
|
+
path.join(currentPath, '/src/scripts/index.js')
|
|
17
|
+
]
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Autogenerated Entrypoint
|
|
3
|
+
* DO NOT MODIFY
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import path from 'path';
|
|
7
|
+
import { fileURLToPath } from 'url';
|
|
8
|
+
const currentPath = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
|
|
9
|
+
|
|
10
|
+
export default {
|
|
11
|
+
entry: {
|
|
12
|
+
'font-only': path.join(currentPath, 'src', 'styles', 'font-only.css'),
|
|
13
|
+
santabarbara: [
|
|
14
|
+
path.join(currentPath, '/src/styles/font-only.css'),
|
|
15
|
+
path.join(currentPath, '/src/styles/colorschemes/santabarbara.scss'),
|
|
16
|
+
path.join(currentPath, '/src/scripts/index.js')
|
|
17
|
+
]
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Autogenerated Entrypoint
|
|
3
|
+
* DO NOT MODIFY
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import path from 'path';
|
|
7
|
+
import { fileURLToPath } from 'url';
|
|
8
|
+
const currentPath = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
|
|
9
|
+
|
|
10
|
+
export default {
|
|
11
|
+
entry: {
|
|
12
|
+
'font-only': path.join(currentPath, 'src', 'styles', 'font-only.css'),
|
|
13
|
+
santacruz: [
|
|
14
|
+
path.join(currentPath, '/src/styles/font-only.css'),
|
|
15
|
+
path.join(currentPath, '/src/styles/colorschemes/santacruz.scss'),
|
|
16
|
+
path.join(currentPath, '/src/scripts/index.js')
|
|
17
|
+
]
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Autogenerated Entrypoint
|
|
3
|
+
* DO NOT MODIFY
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import path from 'path';
|
|
7
|
+
import { fileURLToPath } from 'url';
|
|
8
|
+
const currentPath = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
|
|
9
|
+
|
|
10
|
+
export default {
|
|
11
|
+
entry: {
|
|
12
|
+
'font-only': path.join(currentPath, 'src', 'styles', 'font-only.css'),
|
|
13
|
+
shasta: [
|
|
14
|
+
path.join(currentPath, '/src/styles/font-only.css'),
|
|
15
|
+
path.join(currentPath, '/src/styles/colorschemes/shasta.scss'),
|
|
16
|
+
path.join(currentPath, '/src/scripts/index.js')
|
|
17
|
+
]
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Autogenerated Entrypoint
|
|
3
|
+
* DO NOT MODIFY
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import path from 'path';
|
|
7
|
+
import { fileURLToPath } from 'url';
|
|
8
|
+
const currentPath = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
|
|
9
|
+
|
|
10
|
+
export default {
|
|
11
|
+
entry: {
|
|
12
|
+
'font-only': path.join(currentPath, 'src', 'styles', 'font-only.css'),
|
|
13
|
+
sierra: [
|
|
14
|
+
path.join(currentPath, '/src/styles/font-only.css'),
|
|
15
|
+
path.join(currentPath, '/src/styles/colorschemes/sierra.scss'),
|
|
16
|
+
path.join(currentPath, '/src/scripts/index.js')
|
|
17
|
+
]
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Autogenerated Entrypoint
|
|
3
|
+
* DO NOT MODIFY
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import path from 'path';
|
|
7
|
+
import { fileURLToPath } from 'url';
|
|
8
|
+
const currentPath = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
|
|
9
|
+
|
|
10
|
+
export default {
|
|
11
|
+
entry: {
|
|
12
|
+
'font-only': path.join(currentPath, 'src', 'styles', 'font-only.css'),
|
|
13
|
+
trinity: [
|
|
14
|
+
path.join(currentPath, '/src/styles/font-only.css'),
|
|
15
|
+
path.join(currentPath, '/src/styles/colorschemes/trinity.scss'),
|
|
16
|
+
path.join(currentPath, '/src/scripts/index.js')
|
|
17
|
+
]
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* External dependencies
|
|
5
|
+
*/
|
|
6
|
+
import fs from 'fs';
|
|
7
|
+
import path from 'path';
|
|
8
|
+
import chalk from 'chalk';
|
|
9
|
+
import deepmerge from 'deepmerge';
|
|
10
|
+
import { fileURLToPath, URL } from 'url';
|
|
11
|
+
import HtmlWebpackPlugin from 'html-webpack-plugin';
|
|
12
|
+
/*
|
|
13
|
+
import spawn from 'cross-spawn';
|
|
14
|
+
import { getAllFilesSync } from 'get-all-files'
|
|
15
|
+
import EntryDependency from "webpack/lib/dependencies/EntryDependency.js";
|
|
16
|
+
import fs from 'fs';
|
|
17
|
+
|
|
18
|
+
const boldWhite = chalk.bold.white;
|
|
19
|
+
const boldGreen = chalk.bold.green;
|
|
20
|
+
const boldBlue = chalk.bold.hex('#03a7fc');
|
|
21
|
+
*/
|
|
22
|
+
const currentPath = path.dirname(fileURLToPath(import.meta.url));
|
|
23
|
+
const appPath = process.cwd();
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Launches CAWeb HTML Markup
|
|
28
|
+
*
|
|
29
|
+
* Requires the devServer to be able to writeToDisk
|
|
30
|
+
* devMiddleware: {
|
|
31
|
+
* writeToDisk: true,
|
|
32
|
+
* }
|
|
33
|
+
*
|
|
34
|
+
* @class CAWebHTMLPlugin
|
|
35
|
+
* @typedef {CAWebHTMLPlugin}
|
|
36
|
+
* @extends {HtmlWebpackPlugin}
|
|
37
|
+
*/
|
|
38
|
+
class CAWebHTMLPlugin extends HtmlWebpackPlugin{
|
|
39
|
+
|
|
40
|
+
// we change some of the html-webpack-plugin defaults
|
|
41
|
+
constructor(opts = {}) {
|
|
42
|
+
let templates = ['blank', 'default'];
|
|
43
|
+
|
|
44
|
+
let defaultOptions = {
|
|
45
|
+
title: path.basename( appPath ),
|
|
46
|
+
favicon: fs.existsSync(path.join(appPath, 'sample', 'favicon.ico')) ? path.join(appPath, 'sample', 'favicon.ico') : path.join(currentPath, 'sample', 'favicon.ico'),
|
|
47
|
+
inject: 'body',
|
|
48
|
+
template: path.join( currentPath, 'sample', 'default.html'),
|
|
49
|
+
scriptLoading: 'blocking',
|
|
50
|
+
meta: {
|
|
51
|
+
"Author": "CAWebPublishing",
|
|
52
|
+
"Description": "State of California",
|
|
53
|
+
"Keywords": "California,government",
|
|
54
|
+
"viewport": "width=device-width, initial-scale=1.0, maximum-scale=2.0"
|
|
55
|
+
},
|
|
56
|
+
templateParameters: {
|
|
57
|
+
"title": path.basename( appPath ),
|
|
58
|
+
"scheme": "oceanside",
|
|
59
|
+
"logo": "https://caweb.cdt.ca.gov/wp-content/uploads/sites/221/2023/06/caweb-publishing-logo.png"
|
|
60
|
+
},
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// update templateParameters.title to match user options.
|
|
64
|
+
if( opts.title ){
|
|
65
|
+
defaultOptions.templateParameters.title = opts.title;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
if( fs.existsSync( path.join(appPath, 'caweb.json') ) ){
|
|
69
|
+
|
|
70
|
+
let dataFile = JSON.parse( fs.readFileSync( path.join(appPath, 'caweb.json') ) );
|
|
71
|
+
|
|
72
|
+
if( dataFile.site ){
|
|
73
|
+
defaultOptions.templateParameters = {
|
|
74
|
+
...defaultOptions.templateParameters,
|
|
75
|
+
...dataFile.site
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// select template file based on template selection if template is one of ours
|
|
82
|
+
if( opts.template && templates.includes(opts.template) ){
|
|
83
|
+
opts.template = path.join( currentPath, 'sample', `${opts.template}.html`);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
super(deepmerge(defaultOptions, opts));
|
|
87
|
+
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
apply(compiler) {
|
|
91
|
+
super.apply(compiler);
|
|
92
|
+
}
|
|
93
|
+
} // end of class
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
export default CAWebHTMLPlugin;
|