@caweb/webpack 1.3.43 → 1.4.0-beta.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.
Files changed (91) hide show
  1. package/package.json +16 -9
  2. package/{plugins/html/webpack.config.js → webpack.config.js} +77 -49
  3. package/.github/workflows/config-publish.yml +0 -23
  4. package/.github/workflows/plugins-publish.yml +0 -31
  5. package/.github/workflows/test +0 -29
  6. package/.gitmodules +0 -3
  7. package/CHANGELOG.md +0 -270
  8. package/plugins/a11y/README.md +0 -19
  9. package/plugins/a11y/aceconfig.js +0 -44
  10. package/plugins/a11y/changelog.txt +0 -31
  11. package/plugins/a11y/index.js +0 -271
  12. package/plugins/a11y/package-lock.json +0 -3303
  13. package/plugins/a11y/package.json +0 -42
  14. package/plugins/css-audit/README.md +0 -20
  15. package/plugins/css-audit/changelog.txt +0 -41
  16. package/plugins/css-audit/css-audit.config.cjs +0 -5
  17. package/plugins/css-audit/default.config.js +0 -19
  18. package/plugins/css-audit/index.js +0 -326
  19. package/plugins/css-audit/package-lock.json +0 -1522
  20. package/plugins/css-audit/package.json +0 -53
  21. package/plugins/css-audit/sample/no-files.html +0 -9
  22. package/plugins/html/CHANGELOG.md +0 -297
  23. package/plugins/html/README.md +0 -62
  24. package/plugins/html/entry/delta.js +0 -19
  25. package/plugins/html/entry/eureka.js +0 -19
  26. package/plugins/html/entry/mono.js +0 -19
  27. package/plugins/html/entry/oceanside.js +0 -19
  28. package/plugins/html/entry/orangecounty.js +0 -19
  29. package/plugins/html/entry/pasorobles.js +0 -19
  30. package/plugins/html/entry/sacramento.js +0 -19
  31. package/plugins/html/entry/santabarbara.js +0 -19
  32. package/plugins/html/entry/santacruz.js +0 -19
  33. package/plugins/html/entry/shasta.js +0 -19
  34. package/plugins/html/entry/sierra.js +0 -19
  35. package/plugins/html/entry/trinity.js +0 -19
  36. package/plugins/html/index.js +0 -105
  37. package/plugins/html/package-lock.json +0 -22895
  38. package/plugins/html/package.json +0 -135
  39. package/plugins/html/sample/blank.html +0 -13
  40. package/plugins/html/sample/components/alerts.html +0 -32
  41. package/plugins/html/sample/components/animations.html +0 -7
  42. package/plugins/html/sample/components/buttons.html +0 -5
  43. package/plugins/html/sample/components/cards.html +0 -77
  44. package/plugins/html/sample/components/lists.html +0 -75
  45. package/plugins/html/sample/components/locations.html +0 -49
  46. package/plugins/html/sample/components/profile-banners.html +0 -48
  47. package/plugins/html/sample/components/sections.html +0 -16
  48. package/plugins/html/sample/components/service-tiles.html +0 -73
  49. package/plugins/html/sample/components/typography.html +0 -42
  50. package/plugins/html/sample/default.html +0 -53
  51. package/plugins/html/sample/favicon.ico +0 -0
  52. package/plugins/html/sample/images/black_puppy.jpg +0 -0
  53. package/plugins/html/sample/images/dolphin_marine_mammals_water.jpg +0 -0
  54. package/plugins/html/sample/images/grayscale_mountain.jpg +0 -0
  55. package/plugins/html/sample/images/silhouette.png +0 -0
  56. package/plugins/html/sample/images/squirrel_tail_bushy_tail.jpg +0 -0
  57. package/plugins/html/sample/index.html +0 -80
  58. package/plugins/html/sample/missing/content.html +0 -4
  59. package/plugins/html/sample/search.html +0 -55
  60. package/plugins/html/sample/structural/branding.html +0 -21
  61. package/plugins/html/sample/structural/footer.html +0 -47
  62. package/plugins/html/sample/structural/header.html +0 -16
  63. package/plugins/html/sample/structural/mobile-controls.html +0 -5
  64. package/plugins/html/sample/structural/navigation.html +0 -30
  65. package/plugins/html/sample/structural/search.html +0 -13
  66. package/plugins/html/sample/structural/utility-header.html +0 -23
  67. package/plugins/html/scripts/create-entrypoints.js +0 -60
  68. package/plugins/html/scripts/schemes.js +0 -123
  69. package/plugins/html/scripts/update-scripts.js +0 -47
  70. package/plugins/html/scripts/webpack.test.js +0 -41
  71. package/plugins/jshint/.customrc +0 -29
  72. package/plugins/jshint/.jshintrc +0 -31
  73. package/plugins/jshint/README.md +0 -24
  74. package/plugins/jshint/changelog.txt +0 -36
  75. package/plugins/jshint/index.js +0 -291
  76. package/plugins/jshint/package-lock.json +0 -24453
  77. package/plugins/jshint/package.json +0 -50
  78. package/plugins/jshint/reporter.cjs +0 -301
  79. package/plugins/jshint/sample/no-files.html +0 -9
  80. package/plugins/jshint/scripts/webpack.test.js +0 -18
  81. package/sample/index.html +0 -364
  82. package/scripts/update-deps.js +0 -38
  83. /package/{plugins/html/helpers → helpers}/logic/endsWith.js +0 -0
  84. /package/{plugins/html/helpers → helpers}/logic/ifCond.js +0 -0
  85. /package/{plugins/html/helpers → helpers}/object/jsonParse.js +0 -0
  86. /package/{plugins/html/helpers → helpers}/object/jsonStringify.js +0 -0
  87. /package/{plugins/html/helpers → helpers}/string/replace.js +0 -0
  88. /package/{plugins/html/helpers → helpers}/string/toLower.js +0 -0
  89. /package/{plugins/html/helpers → helpers}/string/toTitleCase.js +0 -0
  90. /package/{plugins/html/helpers → helpers}/string/toUpper.js +0 -0
  91. /package/{plugins/html/tsconfig.json → tsconfig.json} +0 -0
package/package.json CHANGED
@@ -1,8 +1,13 @@
1
1
  {
2
2
  "name": "@caweb/webpack",
3
- "version": "1.3.43",
3
+ "version": "1.4.0-beta.0",
4
4
  "description": "CAWebPublishing Webpack Configuration",
5
- "main": "index.js",
5
+ "main": "webpack.config.js",
6
+ "files": [
7
+ "webpack.config.js",
8
+ "tsconfig.json",
9
+ "helpers"
10
+ ],
6
11
  "type": "module",
7
12
  "scripts": {
8
13
  "webpack": "webpack",
@@ -31,13 +36,15 @@
31
36
  "access": "public"
32
37
  },
33
38
  "homepage": "https://github.com/CAWebPublishing/webpack#readme",
34
- "devDependencies": {
35
- "webpack": "^5.99.8"
36
- },
37
39
  "dependencies": {
38
- "@caweb/a11y-webpack-plugin": "^1.0.9",
39
- "@caweb/css-audit-webpack-plugin": "^1.0.12",
40
- "@caweb/html-webpack-plugin": "^1.7.12",
41
- "@caweb/jshint-webpack-plugin": "^2.0.1"
40
+ "@wordpress/scripts": "^30.16.0",
41
+ "css-minimizer-webpack-plugin": "^7.0.2",
42
+ "handlebars-loader": "^1.7.3",
43
+ "html-webpack-link-type-plugin": "^1.1.1",
44
+ "html-webpack-skip-assets-plugin": "^1.0.4",
45
+ "mini-css-extract-plugin": "^2.9.2",
46
+ "rtlcss-webpack-plugin": "^4.0.7",
47
+ "webpack-dev-server": "^5.2.1",
48
+ "webpack-remove-empty-scripts": "^1.0.4"
42
49
  }
43
50
  }
@@ -22,18 +22,23 @@ import {HtmlWebpackSkipAssetsPlugin} from 'html-webpack-skip-assets-plugin';
22
22
  import {HtmlWebpackLinkTypePlugin} from 'html-webpack-link-type-plugin';
23
23
  import RemoveEmptyScriptsPlugin from 'webpack-remove-empty-scripts';
24
24
 
25
- import JSHintPlugin from '@caweb/jshint-webpack-plugin';
26
- import CSSAuditPlugin from '@caweb/css-audit-webpack-plugin';
27
- import A11yPlugin from '@caweb/a11y-webpack-plugin';
25
+ // import JSHintPlugin from '@caweb/jshint-webpack-plugin';
26
+ // import CSSAuditPlugin from '@caweb/css-audit-webpack-plugin';
27
+ // import A11yPlugin from '@caweb/a11y-webpack-plugin';
28
28
 
29
29
  /**
30
30
  * Internal dependencies
31
31
  */
32
- import CAWebHTMLPlugin from './index.js';
32
+ import CAWebHTMLPlugin from '@caweb/html-webpack-plugin';
33
33
 
34
34
  const webpackCommand = 'build' === process.argv[2] ? 'build' : 'serve' ;
35
+
36
+ // this is the path to this current file
35
37
  const currentPath = path.dirname(fileURLToPath(import.meta.url));
36
38
 
39
+ // this is the path to the current project directory
40
+ const appPath = process.cwd();
41
+
37
42
  // flags can be passed via argv0
38
43
  // we also add args from NODE_OPTIONS
39
44
  const flags = [].concat(
@@ -101,6 +106,11 @@ baseConfig.plugins.splice(1,1, false);
101
106
  */
102
107
  delete baseConfig.devServer;
103
108
 
109
+ // we allow the user to pass custom template helpers
110
+ const customTemplateHelpers = fs.existsSync(path.resolve('helpers'), {withFileTypes: true} ) ?
111
+ fs.readdirSync(path.resolve('helpers'), {withFileTypes: true} ).filter( Dirent => Dirent.isDirectory() ).map( Dirent => path.resolve(Dirent.parentPath, Dirent.name) ) :
112
+ [];
113
+
104
114
  // Wordpress ignores the webpack --mode flag
105
115
  // if the flag is passed we use that mode
106
116
  // otherwise use whatever Wordpress is using
@@ -161,38 +171,68 @@ let webpackConfig = {
161
171
  path.resolve(currentPath, 'helpers', 'logic'),
162
172
  path.resolve(currentPath, 'helpers', 'object'),
163
173
  path.resolve(currentPath, 'helpers', 'string')
164
- ],
174
+ ].concat( customTemplateHelpers ),
165
175
  partialResolver: function(partial, callback){
166
176
  /**
167
- * All template partials are loaded from the root sample directory
168
- * if the file doesn't exist we fallback to our sample template partials
177
+ * All template partials are loaded from the root directory
178
+ * if the file doesn't exist we fallback to our template partials
169
179
  */
170
- let partialPath = path.join( process.cwd(), 'sample' );
171
- let partialStructurePath = path.join( partialPath, 'structural' );
180
+ let fallbackPath = path.join( currentPath, '..', 'template' );
181
+ let partialDir = '';
172
182
 
173
183
  // template parameter specific partials
174
184
  switch( partial ){
175
- // header/footer is served from the /sample/structural/ directory
185
+ /**
186
+ * Semantic elements are served from the /semantic/ directory
187
+ *
188
+ * - header
189
+ * - footer
190
+ *
191
+ * @link https://www.w3schools.com/html/html5_semantic_elements.asp
192
+ */
193
+ case 'branding':
176
194
  case 'footer':
177
195
  case 'header':
178
- partialPath = fs.existsSync(path.join( partialStructurePath, `/${partial}.html` )) ? path.join( partialStructurePath, `/${partial}.html` ) :
179
- `./structural/${partial}.html`
180
-
181
- break;
182
-
196
+ case 'mobileControls':
197
+ case 'navHeader':
198
+ case 'utilityHeader':
199
+ partialDir = 'semantics';
200
+ break;
201
+
202
+ // content is served from the /content/ directory
203
+ case 'index':
183
204
  case 'content':
184
- // content is served from /sample/index.html
185
- partialPath = fs.existsSync(path.join( partialPath, '/index.html' )) ? path.join( partialPath, '/index.html' ) :
186
- './missing/content.html';
205
+ partialDir = 'content';
206
+ break;
187
207
 
208
+ // components are served from the /components/ directory
209
+ case 'alerts':
210
+ partialDir = 'components';
211
+ break;
212
+
213
+ // forms are served from the /forms/ directory
214
+ case 'searchForm':
215
+ partialDir = 'forms';
188
216
  break;
189
217
 
190
- // if not a template parameter we let the loader handle it
191
- default:
192
- partialPath = partial;
218
+ // tables are served from the /tables/ directory
219
+ case partial.includes('Table'):
220
+ partialDir = 'tables';
221
+ break;
193
222
  }
194
223
 
195
- callback(false, partialPath );
224
+ if( partialDir ){
225
+ // we remove the Form from the name
226
+ // we remove the Table from the name
227
+ // we change the partial name from camelCase to dash-case
228
+ partial = partial.replace(/(Form|Table)/, '').replace(/([A-Z])/g, '-$1').toLowerCase();
229
+
230
+ partial = fs.existsSync( path.join( appPath, partialDir, `/${partial}.html` )) ?
231
+ path.join( appPath, partialDir, `/${partial}.html` ) :
232
+ path.join( fallbackPath, partialDir, `/${partial}.html` )
233
+ }
234
+
235
+ callback(false, partial );
196
236
  }
197
237
  }
198
238
  },
@@ -229,9 +269,12 @@ let webpackConfig = {
229
269
  * Serve Only
230
270
  */
231
271
  if( 'serve' === webpackCommand ){
232
- const appPath = process.cwd();
233
272
  let template = flags.includes('--template') ? getArgVal('--template') : 'default';
234
273
  let scheme = flags.includes('--scheme') ? getArgVal('--scheme') : 'oceanside';
274
+
275
+ let host = flags.includes('--host') ? getArgVal('--host') : 'localhost';
276
+ let port = flags.includes('--port') ? getArgVal('--port') : 9000;
277
+ let server = flags.includes('--server-type') ? getArgVal('--server-type') : 'http';
235
278
 
236
279
  // Dev Server is added
237
280
  webpackConfig.devServer = {
@@ -241,30 +284,20 @@ if( 'serve' === webpackCommand ){
241
284
  hot: true,
242
285
  compress: true,
243
286
  allowedHosts: 'auto',
244
- host: 'localhost',
245
- port: 9000,
246
- open: [ 'http://localhost:9000' ],
287
+ server,
288
+ host,
289
+ port,
290
+ open: [ `${server}://${host}:${port}` ],
247
291
  static: [
248
292
  /**
249
293
  * Static files are served from the following files in the following order
250
294
  * we don't have to add the build directory since that is the output.path and proxied
251
- * public - Default
252
- * sample - Allows loading sample files
295
+ *
253
296
  * node_modules - Allows loading files from other npm packages
254
- * src - Allows loading files that aren't compiled
255
297
  */
256
- {
257
- directory: path.join(appPath, 'public'),
258
- },
259
- {
260
- directory: path.join(appPath, 'sample'),
261
- },
262
298
  {
263
299
  directory: path.join(appPath, 'node_modules'),
264
- },
265
- {
266
- directory: path.join(appPath, 'src'),
267
- },
300
+ }
268
301
  ],
269
302
  proxy:[
270
303
  /**
@@ -273,7 +306,7 @@ if( 'serve' === webpackCommand ){
273
306
  */
274
307
  {
275
308
  context: ['/build'],
276
- target: 'http://localhost:9000',
309
+ target: `${server}://${host}:${port}`,
277
310
  pathRewrite: {
278
311
  '^/build': ''
279
312
  },
@@ -284,13 +317,8 @@ if( 'serve' === webpackCommand ){
284
317
  */
285
318
  {
286
319
  context: ['/node_modules'],
287
- target: 'http://localhost:9000',
320
+ target: `${server}://${host}:${port}`,
288
321
  pathRewrite: { '^/node_modules': '' },
289
- },
290
- {
291
- context: ['/src'],
292
- target: 'http://localhost:9000',
293
- pathRewrite: { '^/src': '' },
294
322
  }
295
323
  ]
296
324
  }
@@ -312,9 +340,9 @@ if( 'serve' === webpackCommand ){
312
340
  }),
313
341
  new HtmlWebpackSkipAssetsPlugin(),
314
342
  new HtmlWebpackLinkTypePlugin(),
315
- ! flagExists('--no-jshint') ? new JSHintPlugin() : false,
316
- ! flagExists('--no-audit') ? new CSSAuditPlugin() : false,
317
- ! flagExists('--no-a11y') ? new A11yPlugin() : false
343
+ //! flagExists('--no-jshint') ? new JSHintPlugin() : false,
344
+ //! flagExists('--no-audit') ? new CSSAuditPlugin() : false,
345
+ //! flagExists('--no-a11y') ? new A11yPlugin() : false
318
346
  )
319
347
 
320
348
  // we add the SERP (Search Engine Results Page)
@@ -1,23 +0,0 @@
1
- # This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
2
- # For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
3
-
4
- name: Publish Main Webpack Config
5
-
6
- on:
7
- workflow_dispatch:
8
- push:
9
- branches:
10
- - main
11
- jobs:
12
- publish-npm:
13
- runs-on: ubuntu-latest
14
- steps:
15
- - uses: actions/checkout@v4
16
- - uses: actions/setup-node@v4
17
- with:
18
- node-version: 20
19
- registry-url: https://registry.npmjs.org/
20
- - run: npm ci
21
- - run: npm publish
22
- env:
23
- NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
@@ -1,31 +0,0 @@
1
- # This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
2
- # For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
3
-
4
- name: Publish Plugins to NPM
5
-
6
- on:
7
- workflow_dispatch:
8
- push:
9
- branches:
10
- - a11y
11
- - css-audit
12
- - html
13
- - jshint
14
-
15
- jobs:
16
- publish-npm:
17
- runs-on: ubuntu-latest
18
- defaults:
19
- run:
20
- working-directory: plugins/${{ github.ref_name }}
21
- steps:
22
- - uses: actions/checkout@v4
23
- - uses: actions/setup-node@v4
24
- with:
25
- node-version: 20
26
- registry-url: https://registry.npmjs.org/
27
- - run: git submodule update --init
28
- - run: npm ci
29
- - run: npm publish
30
- env:
31
- NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
@@ -1,29 +0,0 @@
1
- # This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
2
- # For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
3
-
4
- name: Publish Plugins to NPM
5
-
6
- on:
7
- workflow_dispatch:
8
-
9
- jobs:
10
- build:
11
- runs-on: ubuntu-latest
12
- steps:
13
- - uses: actions/checkout@v4
14
- - uses: actions/setup-node@v4
15
- with:
16
- node-version: 20
17
- - run: ls
18
- publish-npm:
19
- needs: build
20
- runs-on: ubuntu-latest
21
- steps:
22
- - uses: actions/checkout@v4
23
- - uses: actions/setup-node@v4
24
- with:
25
- node-version: 20
26
- registry-url: https://registry.npmjs.org/
27
- - run: console.log( 'published' )
28
- env:
29
- NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
package/.gitmodules DELETED
@@ -1,3 +0,0 @@
1
- [submodule "css-audit"]
2
- path = plugins/css-audit/bin/auditor
3
- url = https://github.com/WordPress/css-audit
package/CHANGELOG.md DELETED
@@ -1,270 +0,0 @@
1
- v1.3.43
2
- - Updated npm packages
3
-
4
- v1.3.42
5
- - Updated npm packages
6
-
7
- v1.3.41
8
- - Updated npm packages
9
-
10
- v1.3.40
11
- - Updated npm packages
12
-
13
- v1.3.39
14
- - Updated npm packages
15
-
16
- v1.3.38
17
- - Updated npm packages
18
-
19
- v1.3.37
20
- - Updated npm packages
21
-
22
- v1.3.37
23
- - Updated npm packages
24
-
25
- v1.3.36
26
- - Updated npm packages
27
-
28
- v1.3.35
29
- - Updated npm packages
30
-
31
- v1.3.34
32
- - Updated npm packages
33
-
34
- v1.3.33
35
- - Changelog changed from txt to md
36
- - Updated npm packages
37
-
38
- v1.3.32
39
- - Updated npm packages
40
-
41
- v1.3.31
42
- - Updated npm packages
43
-
44
- v1.3.30
45
- - Updated npm packages
46
-
47
- v1.3.29
48
- - Updated npm packages
49
-
50
- v1.3.28
51
- - Updated npm packages
52
-
53
- v1.3.27
54
- - Updated npm packages
55
-
56
- v1.3.26
57
- - Updated npm packages
58
-
59
- v1.3.25
60
- - Updated npm packages
61
-
62
- v1.3.24
63
- - Updated npm packages
64
-
65
- v1.3.23
66
- - Updated npm packages
67
-
68
- v1.3.22
69
- - Updated npm packages
70
-
71
- v1.3.21
72
- - Updated npm packages
73
-
74
- v1.3.20
75
- - Updated npm packages
76
-
77
- v1.3.19
78
- - Updated npm packages
79
-
80
- v1.3.18
81
- - Updated npm packages
82
-
83
- v1.3.17
84
- - Updated npm packages
85
-
86
- v1.3.16
87
- - Updated npm packages
88
-
89
- v1.3.15
90
- - Updated npm packages
91
-
92
- v1.3.14
93
- - Updated npm packages
94
-
95
- v1.3.13
96
- - Updated npm packages
97
-
98
- v1.3.12
99
- - Updated npm packages
100
-
101
- v1.3.11
102
- - Updated npm packages
103
-
104
- v1.3.10
105
- - Updated npm packages
106
-
107
- v1.3.9
108
- - Updated npm packages
109
-
110
- v1.3.8
111
- - Updated npm packages
112
-
113
- v1.3.7
114
- - Updated npm packages
115
-
116
- v1.3.6
117
- - Updated npm packages
118
-
119
- v1.3.5
120
- - Updated npm packages
121
-
122
- v1.3.4
123
- - Updated npm packages
124
-
125
- v1.3.3
126
- - Updated npm packages
127
-
128
- v1.3.2
129
- - Updated npm packages
130
-
131
- v1.3.1
132
- - Updated npm packages
133
-
134
- v1.3.0
135
- - Webpack configuration has been moved to @caweb/html-webpack-plugin
136
-
137
- v1.2.28
138
- - Updated npm packages
139
-
140
- v1.2.27
141
- - Updated npm packages
142
-
143
- v1.2.26
144
- - Updated npm packages
145
-
146
- v1.2.25
147
- - Updated npm packages
148
-
149
- v1.2.24
150
- - Updated npm packages
151
-
152
- v1.2.23
153
- - Updated npm packages
154
-
155
- v1.2.22
156
- - Updated npm packages
157
-
158
- v1.2.21
159
- - Updated npm packages
160
-
161
- v1.2.20
162
- - Updated npm packages
163
-
164
- v1.2.19
165
- - Updated npm packages
166
-
167
- v1.2.18
168
- - Added flags to webpack config, no longer using NODE_OPTIONS
169
- - Updated npm package
170
-
171
- v1.2.17
172
- - Updated npm packages
173
-
174
- v1.2.16
175
- - Updated npm packages
176
-
177
- v1.2.15
178
- - Updated npm packages
179
-
180
- v1.2.14
181
- - Updated npm packages
182
-
183
- v1.2.13
184
- - Updated npm packages
185
-
186
- v1.2.12
187
- - Updated npm packages
188
- - Added html-webpack-link-type-plugin package
189
-
190
- v1.2.11
191
- - Updated npm packages
192
-
193
- v1.2.10
194
- - Updated npm packages
195
-
196
- v1.2.9
197
- - Updated npm packages
198
-
199
- v1.2.8
200
- - Updated npm packages
201
-
202
- v1.2.7
203
- - Updated npm packages
204
-
205
- v1.2.6
206
- - We only add plugin if serving
207
-
208
- v1.2.5
209
- - Updated npm packages
210
-
211
- v1.2.4
212
- - Updated npm packages
213
-
214
- v1.2.3
215
- - Updated npm packages
216
-
217
- v1.2.2
218
- - Added jshint, css-audit, and a11y files to skipAssets
219
-
220
- v1.2.1
221
- - Added missing dependency
222
-
223
- v1.2.0
224
- - Webpack main configuration details moved to html plugin
225
-
226
- v1.1.5
227
- - Update npm packages
228
-
229
- v1.1.4
230
- - Resolved issue with --template flag not switching properly
231
-
232
- v1.1.3
233
- - Removed console messaging
234
-
235
- v1.1.2
236
- - Added flag to config to allow for switching from different templates
237
-
238
- v1.1.1
239
- - Added missing handlebars-loader dependency
240
-
241
- v1.1.0
242
- - Added sample site content
243
- - Added header/footer template parameters
244
-
245
- v1.0.5
246
- - Update npm packages
247
- - Added partialResolver to handlebars-loader
248
-
249
- v1.0.4
250
- - Update npm packages
251
-
252
- v1.0.3
253
- - Update npm packages
254
-
255
- v1.0.2
256
- - Update npm packages
257
-
258
- v1.0.1
259
- - Update jshint plugin
260
-
261
- v1.0.0
262
- - Initial CAWeb HTML Webpack Plugin added
263
- - Updated Webpack Configurations
264
- - Added Page Template to HTML Plugin
265
- - WordPress CSS Audit Webpack Plugin added
266
- - Added output folder option to WordPress CSS Audit Webpack Plugin
267
- - JSHint Webpack Plugin added
268
- - Accessibility Checker Webpack Plugin added
269
- - Added jshint to workflow
270
- - Cleaned up extra files
@@ -1,19 +0,0 @@
1
- This is a Webpack Plugin that utilizes the [IBM Accessibility Checker](https://www.npmjs.com/package/accessibility-checker0) module to perform integrated accessibility testing.
2
-
3
- ## Installation
4
- <pre>npm install --save-dev @caweb/a11y-webpack-plugin</pre>
5
-
6
- ## Get Started
7
- In your Webpack configuration simply add the plugin to your existing plugin array.
8
-
9
- <pre>
10
- import A11yPlugin from '@caweb/a11y-webpack-plugin';
11
-
12
- export default {
13
- plugins: [
14
- new A11yPlugin()
15
- ]
16
- }
17
- </pre>
18
-
19
- ## Options
@@ -1,44 +0,0 @@
1
- /**
2
- * Configuration for Accessibility Checker
3
- * @link https://www.npmjs.com/package/accessibility-checker
4
- */
5
-
6
- let levels = [
7
- 'violation',
8
- 'potentialviolation',
9
- 'recommendation',
10
- 'potentialrecommendation',
11
- 'manual',
12
- 'pass'
13
- ];
14
- let reportLevels = levels;
15
- let failLevels = levels;
16
-
17
- // process args
18
- process.argv.forEach((arg) => {
19
- // remove any report levels
20
- if( arg.includes('--no-report-levels-') ){
21
- let r = arg.replace('--no-report-levels-', '')
22
- delete reportLevels[reportLevels.indexOf(r)]
23
- }
24
- // remove any fails levels
25
- if( arg.includes('--no-fail-levels-') ){
26
- let f = arg.replace('--no-fail-levels-', '')
27
- delete failLevels[failLevels.indexOf(f)]
28
- }
29
- })
30
-
31
- export default {
32
- ruleArchive: "latest",
33
- policies: [
34
- 'WCAG_2_1'
35
- ],
36
- failLevels: failLevels.filter(e=>e),
37
- reportLevels: reportLevels.filter(e=>e),
38
- outputFilename: 'a11y',
39
- outputFolder: "public",
40
- outputFormat: [
41
- 'html'
42
- ],
43
- outputFilenameTimestamp: false
44
- }