@caweb/html-webpack-plugin 2.0.2 → 2.1.1

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 CHANGED
@@ -1,3 +1,9 @@
1
+ v2.1.1
2
+ - Updated npm packages
3
+
4
+ v2.1.0
5
+ - Plugin name was changed
6
+
1
7
  v2.0.2
2
8
  - No longer emitting src/href/styles assets
3
9
 
package/index.js CHANGED
@@ -67,6 +67,8 @@ const processAssets = ( assets = [] , type = 'style') => {
67
67
  });
68
68
  }
69
69
 
70
+ const pluginName = 'CAWebHTMLPlugin';
71
+
70
72
  /**
71
73
  * Launches CAWeb HTML Markup
72
74
  *
@@ -79,7 +81,7 @@ const processAssets = ( assets = [] , type = 'style') => {
79
81
  * @typedef {CAWebHTMLPlugin}
80
82
  * @extends {HtmlWebpackPlugin}
81
83
  */
82
- class CAWebHtmlWebpackPlugin extends HtmlWebpackPlugin{
84
+ class CAWebHTMLPlugin extends HtmlWebpackPlugin{
83
85
 
84
86
  // we change some of the html-webpack-plugin defaults
85
87
  constructor(opts = {}) {
@@ -200,14 +202,14 @@ class CAWebHtmlWebpackPlugin extends HtmlWebpackPlugin{
200
202
  apply(compiler) {
201
203
  super.apply(compiler);
202
204
 
203
- compiler.hooks.compilation.tap("CAWebHtmlWebpackPlugin", (compilation) => {
205
+ compiler.hooks.compilation.tap(pluginName, (compilation) => {
204
206
  /**
205
207
  * Hook into the HtmlWebpackPlugin events
206
208
  *
207
209
  * @link https://github.com/jantimon/html-webpack-plugin?tab=readme-ov-file#events
208
210
  */
209
211
  HtmlWebpackPlugin.getCompilationHooks(compilation).beforeEmit.tapAsync(
210
- "CAWebHtmlWebpackPlugin",
212
+ pluginName,
211
213
  ({html, outputName, plugin}, cb) => {
212
214
  // if the html contains local assets those assets are added to the options.assets array
213
215
  // and the assets are added to the compilation afterEmit
@@ -241,7 +243,7 @@ class CAWebHtmlWebpackPlugin extends HtmlWebpackPlugin{
241
243
  );
242
244
 
243
245
  HtmlWebpackPlugin.getCompilationHooks(compilation).afterEmit.tapAsync(
244
- "CAWebHtmlWebpackPlugin",
246
+ pluginName,
245
247
  ({outputName, plugin}, cb) => {
246
248
 
247
249
  // if there are any assets in the options.assets array
@@ -292,4 +294,4 @@ class CAWebHtmlWebpackPlugin extends HtmlWebpackPlugin{
292
294
  } // end of class
293
295
 
294
296
 
295
- export default CAWebHtmlWebpackPlugin;
297
+ export default CAWebHTMLPlugin;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@caweb/html-webpack-plugin",
3
- "version": "2.0.2",
3
+ "version": "2.1.1",
4
4
  "description": "CAWebPublishing Site Generation HTML Webpack Plugin",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -25,9 +25,9 @@
25
25
  "access": "public"
26
26
  },
27
27
  "dependencies": {
28
- "@caweb/framework": "^1.9.2",
29
- "@caweb/icon-library": "^1.1.6",
30
- "@caweb/template": "^1.0.12",
28
+ "@caweb/framework": "^1.9.4",
29
+ "@caweb/icon-library": "^1.1.7",
30
+ "@caweb/template": "^1.0.13",
31
31
  "html-webpack-plugin": "^5.6.6"
32
32
  },
33
33
  "scripts": {
@@ -37,7 +37,7 @@
37
37
  "test": "echo \"Error: run tests from root\" && exit 0"
38
38
  },
39
39
  "devDependencies": {
40
- "webpack": "^5.104.1",
40
+ "webpack": "^5.105.1",
41
41
  "webpack-cli": "^6.0.1"
42
42
  }
43
43
  }
@@ -12,21 +12,13 @@ import path from 'path';
12
12
  */
13
13
 
14
14
  // we import this current plugin to test it
15
- import CAWebHtmlWebpackPlugin from '../index.js';
15
+ import CAWebHTMLPlugin from '../index.js';
16
16
 
17
17
  export default {
18
18
  plugins: [
19
- new CAWebHtmlWebpackPlugin({
19
+ new CAWebHTMLPlugin({
20
20
  templateParameters: {
21
21
  }
22
22
  })
23
- ],
24
- devServer: {
25
- static: [
26
- // we all serving the local template media files for testing
27
- {
28
- directory: path.join( process.cwd(), '..', 'template', 'media' ),
29
- },
30
- ]
31
- }
23
+ ]
32
24
  };