@caweb/webpack 1.2.27 → 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.
Files changed (83) hide show
  1. package/.github/workflows/config-publish.yml +33 -0
  2. package/.github/workflows/plugins-publish.yml +45 -0
  3. package/.github/workflows/test +29 -0
  4. package/.gitmodules +3 -0
  5. package/README.md +1 -2
  6. package/changelog.txt +137 -0
  7. package/package.json +9 -16
  8. package/plugins/a11y/README.md +19 -0
  9. package/plugins/a11y/aceconfig.js +44 -0
  10. package/plugins/a11y/changelog.txt +31 -0
  11. package/plugins/a11y/index.js +271 -0
  12. package/plugins/a11y/package-lock.json +3303 -0
  13. package/plugins/a11y/package.json +42 -0
  14. package/plugins/css-audit/README.md +20 -0
  15. package/plugins/css-audit/changelog.txt +41 -0
  16. package/plugins/css-audit/css-audit.config.cjs +5 -0
  17. package/plugins/css-audit/default.config.js +19 -0
  18. package/plugins/css-audit/index.js +326 -0
  19. package/plugins/css-audit/package-lock.json +1522 -0
  20. package/plugins/css-audit/package.json +53 -0
  21. package/plugins/css-audit/sample/no-files.html +9 -0
  22. package/plugins/html/README.md +40 -0
  23. package/plugins/html/changelog.txt +134 -0
  24. package/plugins/html/entry/delta.js +20 -0
  25. package/plugins/html/entry/eureka.js +20 -0
  26. package/plugins/html/entry/mono.js +20 -0
  27. package/plugins/html/entry/oceanside.js +20 -0
  28. package/plugins/html/entry/orangecounty.js +20 -0
  29. package/plugins/html/entry/pasorobles.js +20 -0
  30. package/plugins/html/entry/sacramento.js +20 -0
  31. package/plugins/html/entry/santabarbara.js +20 -0
  32. package/plugins/html/entry/santacruz.js +20 -0
  33. package/plugins/html/entry/shasta.js +20 -0
  34. package/plugins/html/entry/sierra.js +20 -0
  35. package/plugins/html/entry/trinity.js +20 -0
  36. package/plugins/html/index.js +96 -0
  37. package/plugins/html/package-lock.json +21977 -0
  38. package/plugins/html/package.json +70 -0
  39. package/plugins/html/sample/blank.html +13 -0
  40. package/plugins/html/sample/components/alerts.html +32 -0
  41. package/plugins/html/sample/components/animations.html +7 -0
  42. package/plugins/html/sample/components/buttons.html +5 -0
  43. package/plugins/html/sample/components/cards.html +73 -0
  44. package/plugins/html/sample/components/lists.html +75 -0
  45. package/plugins/html/sample/components/locations.html +49 -0
  46. package/plugins/html/sample/components/profile-banners.html +48 -0
  47. package/plugins/html/sample/components/sections.html +16 -0
  48. package/plugins/html/sample/components/service-tiles.html +73 -0
  49. package/plugins/html/sample/components/typography.html +42 -0
  50. package/plugins/html/sample/default.html +31 -0
  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 +48 -0
  58. package/plugins/html/sample/missing/content.html +4 -0
  59. package/plugins/html/sample/structural/branding.html +15 -0
  60. package/plugins/html/sample/structural/footer.html +47 -0
  61. package/plugins/html/sample/structural/header.html +16 -0
  62. package/plugins/html/sample/structural/mobile-controls.html +5 -0
  63. package/plugins/html/sample/structural/navigation.html +26 -0
  64. package/plugins/html/sample/structural/search.html +15 -0
  65. package/plugins/html/sample/structural/utility-header.html +23 -0
  66. package/plugins/html/scripts/create-entrypoints.js +62 -0
  67. package/plugins/html/scripts/icon.js +60 -0
  68. package/plugins/html/scripts/webpack.test.js +41 -0
  69. package/plugins/html/webpack.config.js +279 -0
  70. package/plugins/jshint/.jshintrc +31 -0
  71. package/plugins/jshint/README.md +26 -0
  72. package/plugins/jshint/changelog.txt +30 -0
  73. package/plugins/jshint/index.js +296 -0
  74. package/plugins/jshint/package-lock.json +1779 -0
  75. package/plugins/jshint/package.json +45 -0
  76. package/plugins/jshint/reporter.cjs +663 -0
  77. package/plugins/jshint/sample/jshint.css +247 -0
  78. package/plugins/jshint/sample/jshint.html +7 -0
  79. package/plugins/jshint/sample/jshint.js +25 -0
  80. package/plugins/jshint/sample/no-files.html +9 -0
  81. package/sample/index.html +364 -0
  82. package/scripts/update-deps.js +38 -0
  83. package/webpack.config.js +0 -54
@@ -0,0 +1,38 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * External dependencies
5
+ */
6
+ import fs from 'fs';
7
+ import path from 'path';
8
+
9
+ const localFile = path.join(process.cwd(), 'package.json');
10
+ const depPath = process.argv[2];
11
+
12
+ // only run if dependency path was passed.
13
+ if( depPath ){
14
+ let currentPkg = JSON.parse( fs.readFileSync(localFile) );
15
+
16
+ // iterate over dep path
17
+ fs.readdirSync( path.resolve( depPath ) ).forEach( file => {
18
+ // if directory has a package.json file
19
+ if(
20
+ fs.statSync(path.resolve(depPath, file)).isDirectory() &&
21
+ fs.existsSync(path.resolve(depPath, file, 'package.json'))
22
+ ){
23
+ const {name, version} = JSON.parse( fs.readFileSync(path.resolve(depPath, file, 'package.json')) );
24
+
25
+ // update package.json
26
+ currentPkg.dependencies[name] = `^${version}`
27
+ }
28
+ })
29
+
30
+ // write update back to file
31
+ fs.writeFileSync(
32
+ localFile,
33
+ JSON.stringify( currentPkg, null, 2 )
34
+ );
35
+
36
+ }else{
37
+ console.log( 'Error: ', 'Dependency path not provided.')
38
+ }
package/webpack.config.js DELETED
@@ -1,54 +0,0 @@
1
- /**
2
- * Webpack Configuration
3
- *
4
- * @see @caweb/html-webpack-plugin/webpack.config.js
5
- * @link https://webpack.js.org/configuration/
6
- */
7
-
8
- /**
9
- * External dependencies
10
- */
11
- import webpackConfig from '@caweb/html-webpack-plugin/webpack.config.js';
12
-
13
- import CAWebHTMLPlugin from '@caweb/html-webpack-plugin';
14
- import JSHintPlugin from '@caweb/jshint-webpack-plugin';
15
- import CSSAuditPlugin from '@caweb/css-audit-webpack-plugin';
16
- import A11yPlugin from '@caweb/a11y-webpack-plugin';
17
-
18
- import {HtmlWebpackSkipAssetsPlugin} from 'html-webpack-skip-assets-plugin';
19
- import {HtmlWebpackLinkTypePlugin} from 'html-webpack-link-type-plugin';
20
-
21
- const webpackCommand = 'build' === process.argv[2] ? 'build' : 'serve' ;
22
-
23
- const flags = process.argv0.split(' ');
24
-
25
- // only if serving do we add the plugins
26
- if( 'serve' === webpackCommand ){
27
-
28
- let template = flags.includes('--template') ? flags[flags.indexOf('--template') + 1] : 'default';
29
- let scheme = flags.includes('--scheme') ? flags[flags.indexOf('--scheme') + 1] : 'oceanside';
30
-
31
- // Page Template and additional plugins
32
- webpackConfig.plugins.push(
33
- new CAWebHTMLPlugin({
34
- template,
35
- templateParameters: {
36
- scheme: 'false' !== scheme ? scheme : false
37
- },
38
- skipAssets: [
39
- /.*-rtl.css/, // we skip the Right-to-Left Styles
40
- /css-audit.*/, // we skip the CSSAudit Files
41
- /a11y.*/, // we skip the A11y Files
42
- /jshint.*/, // we skip the JSHint Files
43
- /font-only.js/, // we skip the font-only Files
44
- ]
45
- }),
46
- new HtmlWebpackSkipAssetsPlugin(),
47
- new HtmlWebpackLinkTypePlugin(),
48
- ! flags.includes('--no-jshint') ? new JSHintPlugin() : false,
49
- ! flags.includes('--no-audit') ? new CSSAuditPlugin() : false,
50
- ! flags.includes('--no-a11y') ? new A11yPlugin() : false
51
- )
52
- }
53
-
54
- export default webpackConfig;