@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,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;
|