@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
@@ -1,105 +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 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', 'search'];
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
- "template": "default",
58
- "title": path.basename( appPath ),
59
- "scheme": "oceanside",
60
- "logo": "https://caweb.cdt.ca.gov/wp-content/uploads/sites/221/2023/06/caweb-publishing-logo.png"
61
- },
62
- }
63
-
64
- // update templateParameters.title to match user options.
65
- if( opts.title ){
66
- defaultOptions.templateParameters.title = opts.title;
67
- }
68
-
69
- // if template selection is one of ours
70
- if( opts.template && templates.includes(opts.template) ){
71
- let template = opts.template;
72
- // update template file based on template selection
73
- opts.template = path.join( currentPath, 'sample', `${template}.html`);
74
-
75
- // update default.templateParameters.template to match user options.
76
- defaultOptions.templateParameters.template = template;
77
- }
78
-
79
- // if there is a caweb.json file we merge the site data with the templateParameters
80
- if( fs.existsSync( path.join(appPath, 'caweb.json') ) ){
81
-
82
- let dataFile = JSON.parse( fs.readFileSync( path.join(appPath, 'caweb.json') ) );
83
-
84
- // if there is a dataFile.site we merge the defaultOptions.templateParameters, user options.templateParameters, and the dataFile.site
85
- if( dataFile.site ){
86
- opts.templateParameters = {
87
- ...defaultOptions.templateParameters,
88
- ...opts.templateParameters,
89
- ...dataFile.site
90
- }
91
- }
92
-
93
- }
94
-
95
- super(deepmerge(defaultOptions, opts));
96
-
97
- }
98
-
99
- apply(compiler) {
100
- super.apply(compiler);
101
- }
102
- } // end of class
103
-
104
-
105
- export default CAWebHTMLPlugin;