@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.
- package/package.json +16 -9
- package/{plugins/html/webpack.config.js → webpack.config.js} +77 -49
- package/.github/workflows/config-publish.yml +0 -23
- package/.github/workflows/plugins-publish.yml +0 -31
- package/.github/workflows/test +0 -29
- package/.gitmodules +0 -3
- package/CHANGELOG.md +0 -270
- package/plugins/a11y/README.md +0 -19
- package/plugins/a11y/aceconfig.js +0 -44
- package/plugins/a11y/changelog.txt +0 -31
- package/plugins/a11y/index.js +0 -271
- package/plugins/a11y/package-lock.json +0 -3303
- package/plugins/a11y/package.json +0 -42
- package/plugins/css-audit/README.md +0 -20
- package/plugins/css-audit/changelog.txt +0 -41
- package/plugins/css-audit/css-audit.config.cjs +0 -5
- package/plugins/css-audit/default.config.js +0 -19
- package/plugins/css-audit/index.js +0 -326
- package/plugins/css-audit/package-lock.json +0 -1522
- package/plugins/css-audit/package.json +0 -53
- package/plugins/css-audit/sample/no-files.html +0 -9
- package/plugins/html/CHANGELOG.md +0 -297
- package/plugins/html/README.md +0 -62
- package/plugins/html/entry/delta.js +0 -19
- package/plugins/html/entry/eureka.js +0 -19
- package/plugins/html/entry/mono.js +0 -19
- package/plugins/html/entry/oceanside.js +0 -19
- package/plugins/html/entry/orangecounty.js +0 -19
- package/plugins/html/entry/pasorobles.js +0 -19
- package/plugins/html/entry/sacramento.js +0 -19
- package/plugins/html/entry/santabarbara.js +0 -19
- package/plugins/html/entry/santacruz.js +0 -19
- package/plugins/html/entry/shasta.js +0 -19
- package/plugins/html/entry/sierra.js +0 -19
- package/plugins/html/entry/trinity.js +0 -19
- package/plugins/html/index.js +0 -105
- package/plugins/html/package-lock.json +0 -22895
- package/plugins/html/package.json +0 -135
- package/plugins/html/sample/blank.html +0 -13
- package/plugins/html/sample/components/alerts.html +0 -32
- package/plugins/html/sample/components/animations.html +0 -7
- package/plugins/html/sample/components/buttons.html +0 -5
- package/plugins/html/sample/components/cards.html +0 -77
- package/plugins/html/sample/components/lists.html +0 -75
- package/plugins/html/sample/components/locations.html +0 -49
- package/plugins/html/sample/components/profile-banners.html +0 -48
- package/plugins/html/sample/components/sections.html +0 -16
- package/plugins/html/sample/components/service-tiles.html +0 -73
- package/plugins/html/sample/components/typography.html +0 -42
- package/plugins/html/sample/default.html +0 -53
- 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 +0 -80
- package/plugins/html/sample/missing/content.html +0 -4
- package/plugins/html/sample/search.html +0 -55
- package/plugins/html/sample/structural/branding.html +0 -21
- package/plugins/html/sample/structural/footer.html +0 -47
- package/plugins/html/sample/structural/header.html +0 -16
- package/plugins/html/sample/structural/mobile-controls.html +0 -5
- package/plugins/html/sample/structural/navigation.html +0 -30
- package/plugins/html/sample/structural/search.html +0 -13
- package/plugins/html/sample/structural/utility-header.html +0 -23
- package/plugins/html/scripts/create-entrypoints.js +0 -60
- package/plugins/html/scripts/schemes.js +0 -123
- package/plugins/html/scripts/update-scripts.js +0 -47
- package/plugins/html/scripts/webpack.test.js +0 -41
- package/plugins/jshint/.customrc +0 -29
- package/plugins/jshint/.jshintrc +0 -31
- package/plugins/jshint/README.md +0 -24
- package/plugins/jshint/changelog.txt +0 -36
- package/plugins/jshint/index.js +0 -291
- package/plugins/jshint/package-lock.json +0 -24453
- package/plugins/jshint/package.json +0 -50
- package/plugins/jshint/reporter.cjs +0 -301
- package/plugins/jshint/sample/no-files.html +0 -9
- package/plugins/jshint/scripts/webpack.test.js +0 -18
- package/sample/index.html +0 -364
- package/scripts/update-deps.js +0 -38
- /package/{plugins/html/helpers → helpers}/logic/endsWith.js +0 -0
- /package/{plugins/html/helpers → helpers}/logic/ifCond.js +0 -0
- /package/{plugins/html/helpers → helpers}/object/jsonParse.js +0 -0
- /package/{plugins/html/helpers → helpers}/object/jsonStringify.js +0 -0
- /package/{plugins/html/helpers → helpers}/string/replace.js +0 -0
- /package/{plugins/html/helpers → helpers}/string/toLower.js +0 -0
- /package/{plugins/html/helpers → helpers}/string/toTitleCase.js +0 -0
- /package/{plugins/html/helpers → helpers}/string/toUpper.js +0 -0
- /package/{plugins/html/tsconfig.json → tsconfig.json} +0 -0
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
<div class="container">
|
|
2
|
-
<nav aria-label="Breadcrumb" class="breadcrumbs">
|
|
3
|
-
<ol>
|
|
4
|
-
<li><a href="https://getbootstrap.com/" target="_blank">Bootstrap 5.3.3</a></li>
|
|
5
|
-
<li><a href="https://www.npmjs.com/package/bootstrap-forced-colors-css" target="_blank">Bootstrap Forced CSS for Windows High Contrast Mode</a></li>
|
|
6
|
-
<li><a href="https://animate.style/" target="_blank">Animate Styles</a></li>
|
|
7
|
-
</ol>
|
|
8
|
-
</nav>
|
|
9
|
-
</div>
|
|
10
|
-
<h1 class="page-title">CAWeb Template</h1>
|
|
11
|
-
<p class="page-date"><time datetime="Sept 12, 2024">Sept 12, 2024</time></p>
|
|
12
|
-
<div class="container">
|
|
13
|
-
<p>CAWeb Template is built with Bootstrap 5.3.3</p>
|
|
14
|
-
<h2>Key Features</h2>
|
|
15
|
-
<ul>
|
|
16
|
-
<li><a href="https://getbootstrap.com/" target="_blank">Bootstrap 5.3.3</a></li>
|
|
17
|
-
<li><a href="https://www.npmjs.com/package/bootstrap-forced-colors-css" target="_blank">Bootstrap Forced CSS for Windows High Contrast Mode</a></li>
|
|
18
|
-
<li><a href="https://animate.style/" target="_blank">Animate Styles</a></li>
|
|
19
|
-
</ul>
|
|
20
|
-
<h2>Components</h2>
|
|
21
|
-
<ul>
|
|
22
|
-
<li>
|
|
23
|
-
<a href="./components/animations.html" target="_blank">Animations</a>
|
|
24
|
-
</li>
|
|
25
|
-
<li>
|
|
26
|
-
<a href="./components/blockquotes.html" target="_blank">Blockquotes</a>
|
|
27
|
-
</li>
|
|
28
|
-
<li>
|
|
29
|
-
<a href="./components/lists.html" target="_blank">Lists</a>
|
|
30
|
-
</li>
|
|
31
|
-
<li>
|
|
32
|
-
<a href="./components/locations.html" target="_blank">Locations</a>
|
|
33
|
-
</li>
|
|
34
|
-
<li>
|
|
35
|
-
<a href="./components/profile-banners.html" tdarget="_blank">Profile Banners</a>
|
|
36
|
-
</li>
|
|
37
|
-
<li>
|
|
38
|
-
<a href="./components/sections.html" target="_blank">Sections</a>
|
|
39
|
-
</li>
|
|
40
|
-
<li>
|
|
41
|
-
<a href="./components/service-tiles.html" target="_blank">Service Tiles</a>
|
|
42
|
-
</li>
|
|
43
|
-
<li>
|
|
44
|
-
<a href="./components/typography.html" target="_blank">Typography</a>
|
|
45
|
-
</li>
|
|
46
|
-
</ul>
|
|
47
|
-
<div class="card card-default">
|
|
48
|
-
<div class="card-header">
|
|
49
|
-
<h4 class="card-title"><span class="ca-gov-icon-share-twitter"></span>Default</h4>
|
|
50
|
-
<div class="options">
|
|
51
|
-
<a href="http://adfa" class="btn btn-secondary btn-light" target="_blank">Read More</a>
|
|
52
|
-
</div>
|
|
53
|
-
</div>
|
|
54
|
-
<div class="card-body">
|
|
55
|
-
<p>Panel Body</p>
|
|
56
|
-
</div>
|
|
57
|
-
</div>
|
|
58
|
-
<div class="card card-standout">
|
|
59
|
-
<div class="card-header centered">
|
|
60
|
-
<h4 class="card-title"><span class="ca-gov-icon-share-twitter"></span>Standout</h4>
|
|
61
|
-
<div class="options">
|
|
62
|
-
<a href="http://adfa" class="btn btn-standout" target="_blank">Read More</a>
|
|
63
|
-
</div>
|
|
64
|
-
</div>
|
|
65
|
-
<div class="card-body">
|
|
66
|
-
<p>Panel Body</p>
|
|
67
|
-
</div>
|
|
68
|
-
</div>
|
|
69
|
-
<div class="card card-standout highlight">
|
|
70
|
-
<div class="card-header right">
|
|
71
|
-
<h4 class="card-title"><span class="ca-gov-icon-share-twitter"></span>Standout Highlight</h4>
|
|
72
|
-
<div class="options">
|
|
73
|
-
<a href="http://adfa" class="btn btn-standout" target="_blank">Read More</a>
|
|
74
|
-
</div>
|
|
75
|
-
</div>
|
|
76
|
-
<div class="card-body">
|
|
77
|
-
<p>Panel Body</p>
|
|
78
|
-
</div>
|
|
79
|
-
</div>
|
|
80
|
-
</div>
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<title>{{ title }}</title>
|
|
5
|
-
{{#if scheme }}
|
|
6
|
-
<!-- Icon Font Library -->
|
|
7
|
-
<link rel="stylesheet" href="node_modules/@caweb/html-webpack-plugin/build/font-only.css" />
|
|
8
|
-
|
|
9
|
-
<!-- Template Scheme CSS -->
|
|
10
|
-
<link rel="stylesheet" href="node_modules/@caweb/html-webpack-plugin/build/{{ scheme }}.css" />
|
|
11
|
-
{{/if}}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
{{#if htmlWebpackPlugin.options.meta }}
|
|
15
|
-
{{#each htmlWebpackPlugin.options.meta }}
|
|
16
|
-
<meta name="{{ @key }}" content="{{ this }}">
|
|
17
|
-
{{/each}}
|
|
18
|
-
{{/if}}
|
|
19
|
-
|
|
20
|
-
{{#if assets }}
|
|
21
|
-
{{#each assets }}
|
|
22
|
-
{{#if (endsWith this ".css") }}
|
|
23
|
-
<link rel="stylesheet" href="{{ this }}" />
|
|
24
|
-
{{/if}}
|
|
25
|
-
{{/each}}
|
|
26
|
-
{{/if}}
|
|
27
|
-
</head>
|
|
28
|
-
<body class="page-template-searchpage">
|
|
29
|
-
{{> header }}
|
|
30
|
-
<div id="page-container" class="page-container">
|
|
31
|
-
<div id="main-content" class="main-content" tabindex="-1">
|
|
32
|
-
<main class="main-primary">
|
|
33
|
-
<div class="section">
|
|
34
|
-
<div class="container">
|
|
35
|
-
{{> './structural/search.html' }}
|
|
36
|
-
<h1>Search results for: </h1>
|
|
37
|
-
<gcse:searchresults-only></gcse:searchresults-only>
|
|
38
|
-
</div>
|
|
39
|
-
</div>
|
|
40
|
-
</main>
|
|
41
|
-
</div>
|
|
42
|
-
</div>
|
|
43
|
-
{{> footer }}
|
|
44
|
-
{{#if scheme }}
|
|
45
|
-
<script src="node_modules/@caweb/html-webpack-plugin/build/{{ scheme }}.js"></script>
|
|
46
|
-
{{/if}}
|
|
47
|
-
{{#if assets }}
|
|
48
|
-
{{#each assets }}
|
|
49
|
-
{{#if (endsWith this ".js") }}
|
|
50
|
-
<script src="{{ this }}"></script>
|
|
51
|
-
{{/if}}
|
|
52
|
-
{{/each}}
|
|
53
|
-
{{/if}}
|
|
54
|
-
</body>
|
|
55
|
-
</html>
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
<!-- Branding -->
|
|
2
|
-
<div class="branding border-bottom">
|
|
3
|
-
<div class="container d-flex flex-row">
|
|
4
|
-
<div class="header-organization-banner">
|
|
5
|
-
<a href="/">
|
|
6
|
-
{{#if logo }}
|
|
7
|
-
<img src="{{ logo }}" alt="State Template Logo" aria-label="State Template Logo">
|
|
8
|
-
{{/if}}
|
|
9
|
-
</a>
|
|
10
|
-
</div>
|
|
11
|
-
{{#if google.search }}
|
|
12
|
-
{{#ifCond 'search' '!==' htmlWebpackPlugin.options.templateParameters.template }}
|
|
13
|
-
|
|
14
|
-
{{> './search.html' }}
|
|
15
|
-
|
|
16
|
-
{{/ifCond}}
|
|
17
|
-
{{/if}}
|
|
18
|
-
<button class="mobile-control toggle-menu ca-gov-icon-menu fs-2" data-bs-toggle="collapse" data-bs-target=".mobile-controlled" aria-expanded="false" aria-controls="mobile-controls" aria-label="Open the navigation menu">
|
|
19
|
-
</button>
|
|
20
|
-
</div>
|
|
21
|
-
</div>
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
<footer class="global-footer">
|
|
2
|
-
<div class="container">
|
|
3
|
-
<div class="d-flex">
|
|
4
|
-
{{#if nav.footer }}
|
|
5
|
-
<ul class="nav footer-links">
|
|
6
|
-
<li class="nav-item">
|
|
7
|
-
<a href="https://www.ca.gov?utm_campaign=state_template_link&utm_medium=footer&utm_source=external" class="nav-link ps-0" title="CA.gov" target="_blank">
|
|
8
|
-
<span class="ca-gov-logo-svg"></span>
|
|
9
|
-
</a>
|
|
10
|
-
</li>
|
|
11
|
-
{{#each nav.footer }}
|
|
12
|
-
{{#if this.url }}{{#if this.label }}
|
|
13
|
-
<li class="nav-item">
|
|
14
|
-
<a href="{{ this.url }}" class="nav-link">{{ this.label }}</a>
|
|
15
|
-
</li>
|
|
16
|
-
{{/if}}{{/if}}
|
|
17
|
-
{{/each}}
|
|
18
|
-
</ul>
|
|
19
|
-
{{/if}}
|
|
20
|
-
{{#if social }}
|
|
21
|
-
<ul class="nav social-share-links">
|
|
22
|
-
{{#each social }}
|
|
23
|
-
{{#if this }}
|
|
24
|
-
<li class="nav-item">
|
|
25
|
-
<a href="{{ this }}" class="nav-link ca-gov-icon-{{ @key }}"><span class="sr-only">{{ @key }}</span></a>
|
|
26
|
-
</li>
|
|
27
|
-
{{/if}}
|
|
28
|
-
{{/each}}
|
|
29
|
-
</ul>
|
|
30
|
-
{{/if}}
|
|
31
|
-
</div>
|
|
32
|
-
</div>
|
|
33
|
-
<!-- Copyright Statement -->
|
|
34
|
-
<div class="copyright container">
|
|
35
|
-
<p>
|
|
36
|
-
©
|
|
37
|
-
<span id="thisyear">
|
|
38
|
-
<script>
|
|
39
|
-
document.getElementById('thisyear').appendChild(document.createTextNode(new Date().getFullYear()))
|
|
40
|
-
</script>
|
|
41
|
-
</span>
|
|
42
|
-
State of California
|
|
43
|
-
</p>
|
|
44
|
-
</div>
|
|
45
|
-
|
|
46
|
-
<button class="return-top">Back to top</button>
|
|
47
|
-
</footer>
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
<header role="banner" id="header" class="global-header">
|
|
2
|
-
<div id="skip-to-content">
|
|
3
|
-
<a href="#main-content">Skip to Main Content</a>
|
|
4
|
-
</div>
|
|
5
|
-
|
|
6
|
-
{{> '../components/alerts.html' }}
|
|
7
|
-
|
|
8
|
-
{{> './utility-header.html' }}
|
|
9
|
-
|
|
10
|
-
{{> './branding.html' }}
|
|
11
|
-
|
|
12
|
-
{{> './mobile-controls.html' }}
|
|
13
|
-
|
|
14
|
-
{{> './navigation.html' }}
|
|
15
|
-
|
|
16
|
-
</header>
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
<!-- Mobile Navigation Controls -->
|
|
2
|
-
<div id="mobile-controls" class="mobile-controlled overlay collapse collapse-horizontal">
|
|
3
|
-
<button class="mobile-control toggle-menu ca-gov-icon-close-mark fs-1" data-bs-toggle="collapse" data-bs-target=".mobile-controlled" aria-expanded="false" aria-controls="mobile-controls" aria-label="Closes the navigation menu">
|
|
4
|
-
</button>
|
|
5
|
-
</div>
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
<!-- Navigation -->
|
|
2
|
-
<div class="navigation border-bottom">
|
|
3
|
-
<div class="container">
|
|
4
|
-
{{#if nav.header }}
|
|
5
|
-
<ul class="nav" aria-label="Main navigation">
|
|
6
|
-
{{#each nav.header }}
|
|
7
|
-
{{#if this.sub }}
|
|
8
|
-
<li class="nav-item dropdown">
|
|
9
|
-
<a class="nav-link dropdown-toggle" data-bs-toggle="dropdown" href="#" role="button" aria-expanded="false" data-bs-popper-config='{"placement": "bottom-start", "strategy": "fixed"}'>{{ this.label }}</a>
|
|
10
|
-
<ul class="dropdown-menu">
|
|
11
|
-
{{#each this.sub }}
|
|
12
|
-
<li>
|
|
13
|
-
<a class="dropdown-item nav-link" href="{{ this.url }}">{{ this.label }}
|
|
14
|
-
{{#if this.description }}
|
|
15
|
-
<div class="link-description">{{ this.description }}</div>
|
|
16
|
-
{{/if}}
|
|
17
|
-
</a>
|
|
18
|
-
</li>
|
|
19
|
-
{{/each}}
|
|
20
|
-
</ul>
|
|
21
|
-
{{else}}
|
|
22
|
-
<li class="nav-item">
|
|
23
|
-
<a class="nav-link" href="{{ this.url }}">{{ this.label }}</a>
|
|
24
|
-
{{/if}}
|
|
25
|
-
</li>
|
|
26
|
-
{{/each}}
|
|
27
|
-
</ul>
|
|
28
|
-
{{/if}}
|
|
29
|
-
</div>
|
|
30
|
-
</div>
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<!-- Search -->
|
|
2
|
-
<div class="search-container">
|
|
3
|
-
<form action="/serp.html" role="search">
|
|
4
|
-
<div class="input-group">
|
|
5
|
-
<span class="sr-only" id="SearchInput">Custom Google Search</span>
|
|
6
|
-
<input type="search" name="q" aria-labelledby="SearchInput" placeholder="Search" class="search-textfield form-control">
|
|
7
|
-
<button type="submit" class="search-button">
|
|
8
|
-
<span class="ca-gov-icon-search" aria-hidden="true"></span>
|
|
9
|
-
<span class="sr-only">Submit</span>
|
|
10
|
-
</button>
|
|
11
|
-
</div>
|
|
12
|
-
</form>
|
|
13
|
-
</div>
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
<!-- Utility Header -->
|
|
2
|
-
<div class="utility-header">
|
|
3
|
-
<div class="container d-flex flex-row">
|
|
4
|
-
<div class="social-media-links">
|
|
5
|
-
<div class="header-cagov-logo">
|
|
6
|
-
<a href="https://www.ca.gov?utm_campaign=state_template_link&utm_medium=header&utm_source=external">
|
|
7
|
-
<span class="sr-only">CA.gov</span>
|
|
8
|
-
<span class="ca-gov-logo-svg"></span>
|
|
9
|
-
</a>
|
|
10
|
-
</div>
|
|
11
|
-
<p class="official-tag">Official website of the State of California</p>
|
|
12
|
-
</div>
|
|
13
|
-
<div class="settings-links">
|
|
14
|
-
{{#if utility-links }}
|
|
15
|
-
{{#each utility-links }}
|
|
16
|
-
{{#if this.url }}{{#if this.label }}
|
|
17
|
-
<a href="{{ this.url }}">{{ this.label }}</a>
|
|
18
|
-
{{/if}}{{/if}}
|
|
19
|
-
{{/each}}
|
|
20
|
-
{{/if}}
|
|
21
|
-
</div>
|
|
22
|
-
</div>
|
|
23
|
-
</div>
|
|
@@ -1,60 +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 { fileURLToPath } from 'url';
|
|
9
|
-
|
|
10
|
-
const currentPath = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
|
|
11
|
-
|
|
12
|
-
let entry = {
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
// create the entry directory
|
|
16
|
-
fs.mkdirSync('entry', {recursive: true});
|
|
17
|
-
|
|
18
|
-
let heading = `/**
|
|
19
|
-
* Autogenerated Entrypoint
|
|
20
|
-
* DO NOT MODIFY
|
|
21
|
-
*/\n`;
|
|
22
|
-
|
|
23
|
-
// iterate over all colorschemes
|
|
24
|
-
fs.readdirSync(path.join(currentPath, 'src', 'styles', 'colorschemes')).forEach((c) => {
|
|
25
|
-
let scheme = c.substring(0, c.indexOf('.')).replace(' ', '');
|
|
26
|
-
let files = [
|
|
27
|
-
path.join(currentPath, 'src', 'styles', 'colorschemes', c),
|
|
28
|
-
path.join(currentPath, 'src', 'scripts', 'index.js')
|
|
29
|
-
]
|
|
30
|
-
// add entries for each colorscheme
|
|
31
|
-
entry[scheme] = files;
|
|
32
|
-
|
|
33
|
-
let correctFiles = files.map(f => `'${f.replace(process.cwd(), '').replaceAll('\\', '/')}'`)
|
|
34
|
-
let output = `
|
|
35
|
-
import path from 'path';
|
|
36
|
-
import { fileURLToPath } from 'url';
|
|
37
|
-
const currentPath = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
|
|
38
|
-
|
|
39
|
-
export default {
|
|
40
|
-
entry: {
|
|
41
|
-
${scheme}: [
|
|
42
|
-
path.join(currentPath, 'node_modules/@caweb/icon-library/build/font-only.css'),
|
|
43
|
-
path.join(currentPath, ${correctFiles.join('),\n' + `\t`.repeat(3) + 'path.join(currentPath, ')})
|
|
44
|
-
]
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
`;
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
// write and entrypoint
|
|
51
|
-
// this allows for serving of a specific entry.
|
|
52
|
-
fs.writeFileSync(
|
|
53
|
-
`./entry/${scheme}.js`,
|
|
54
|
-
`${heading} ${output}`
|
|
55
|
-
)
|
|
56
|
-
|
|
57
|
-
})
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
export default {entry};
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* External dependencies
|
|
3
|
-
*/
|
|
4
|
-
import chalk from 'chalk';
|
|
5
|
-
import fs from 'fs';
|
|
6
|
-
import path from 'path';
|
|
7
|
-
import { confirm, input } from '@inquirer/prompts';
|
|
8
|
-
import spawn from 'cross-spawn';
|
|
9
|
-
|
|
10
|
-
const bullet = chalk.yellow('-');
|
|
11
|
-
const info = chalk.cyan('i');
|
|
12
|
-
|
|
13
|
-
const removing = process.argv.includes( '-r' );
|
|
14
|
-
|
|
15
|
-
// if we are removing a colorscheme
|
|
16
|
-
if( removing ){
|
|
17
|
-
console.log("Which colorscheme would you like to remove?");
|
|
18
|
-
}else{
|
|
19
|
-
// if we are creating a new colorscheme
|
|
20
|
-
console.log("Let's create a new Colorscheme!");
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
const scheme = await input(
|
|
24
|
-
{
|
|
25
|
-
message: "Scheme Name:"
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
clearPromptOnDone: true
|
|
29
|
-
}
|
|
30
|
-
).catch(
|
|
31
|
-
() => {
|
|
32
|
-
process.exit(1);
|
|
33
|
-
}
|
|
34
|
-
);
|
|
35
|
-
|
|
36
|
-
// if we are removing a colorscheme
|
|
37
|
-
if( removing ){
|
|
38
|
-
// remove colorscheme file
|
|
39
|
-
fs.unlinkSync ( path.resolve('src', 'styles', 'colorschemes', `${scheme}.scss`) );
|
|
40
|
-
fs.unlinkSync ( path.resolve('entry', `${scheme}.js`) );
|
|
41
|
-
|
|
42
|
-
console.log(`Removed colorscheme ${scheme}`);
|
|
43
|
-
process.exit(0);
|
|
44
|
-
}else{
|
|
45
|
-
console.log("Colorschemes require 4 colors:");
|
|
46
|
-
console.log(info, "Enter color hex values in the format #RRGGBB");
|
|
47
|
-
|
|
48
|
-
// lets get the 4 colors needed.
|
|
49
|
-
const colors = {
|
|
50
|
-
main: await input(
|
|
51
|
-
{
|
|
52
|
-
message: "Main Color:"
|
|
53
|
-
}
|
|
54
|
-
).catch(
|
|
55
|
-
() => {
|
|
56
|
-
process.exit(1);
|
|
57
|
-
}
|
|
58
|
-
),
|
|
59
|
-
alt: await input(
|
|
60
|
-
{
|
|
61
|
-
message: "Alternate Color:"
|
|
62
|
-
}
|
|
63
|
-
).catch(
|
|
64
|
-
() => {
|
|
65
|
-
process.exit(1);
|
|
66
|
-
}
|
|
67
|
-
),
|
|
68
|
-
highlight: await input(
|
|
69
|
-
{
|
|
70
|
-
message: "Highlight Color:"
|
|
71
|
-
}
|
|
72
|
-
).catch(
|
|
73
|
-
() => {
|
|
74
|
-
process.exit(1);
|
|
75
|
-
}
|
|
76
|
-
),
|
|
77
|
-
standout: await input(
|
|
78
|
-
{
|
|
79
|
-
message: "Standout Color:"
|
|
80
|
-
}
|
|
81
|
-
).catch(
|
|
82
|
-
() => {
|
|
83
|
-
process.exit(1);
|
|
84
|
-
}
|
|
85
|
-
)
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
// write colorscheme file
|
|
89
|
-
fs.writeFileSync(
|
|
90
|
-
path.resolve('src', 'styles', 'colorschemes', `${scheme}.scss`),
|
|
91
|
-
`/* -----------------------------------------
|
|
92
|
-
${scheme.toUpperCase()}
|
|
93
|
-
----------------------------------------- */
|
|
94
|
-
|
|
95
|
-
// scss-docs-start color-variables
|
|
96
|
-
$main: ${colors.main} !default;
|
|
97
|
-
$alt: ${colors.alt} !default;
|
|
98
|
-
$highlight: ${colors.highlight} !default;
|
|
99
|
-
$standout: ${colors.standout} !default;
|
|
100
|
-
// scss-docs-end color-variables
|
|
101
|
-
|
|
102
|
-
@import '../';`
|
|
103
|
-
);
|
|
104
|
-
|
|
105
|
-
// update scripts in package.json
|
|
106
|
-
spawn.sync('npm run update-scripts');
|
|
107
|
-
|
|
108
|
-
// update entrypoints.
|
|
109
|
-
spawn.sync('npm run create-entrypoint');
|
|
110
|
-
|
|
111
|
-
// ask if user would like to serve up the new colorscheme
|
|
112
|
-
let answer = await confirm(
|
|
113
|
-
{
|
|
114
|
-
message: 'Would you like to serve up the new colorscheme?',
|
|
115
|
-
default: true
|
|
116
|
-
}
|
|
117
|
-
).catch(() => {process.exit(1);});
|
|
118
|
-
|
|
119
|
-
if( answer ){
|
|
120
|
-
// serve new colorscheme up
|
|
121
|
-
spawn.sync(`npm run serve:${scheme}`, { stdio: 'inherit' });
|
|
122
|
-
}
|
|
123
|
-
}
|
|
@@ -1,47 +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 { fileURLToPath } from 'url';
|
|
9
|
-
|
|
10
|
-
const pkg = JSON.parse( fs.readFileSync(path.resolve('package.json')) );
|
|
11
|
-
|
|
12
|
-
let scripts = {
|
|
13
|
-
"webpack": "webpack",
|
|
14
|
-
"postbuild": "npm run create-entrypoint",
|
|
15
|
-
"create-entrypoint": "node ./scripts/create-entrypoints.js",
|
|
16
|
-
"update-scripts": "node ./scripts/update-scripts.js",
|
|
17
|
-
"new-scheme": "node ./scripts/schemes.js",
|
|
18
|
-
"remove-scheme": "node ./scripts/schemes.js -r",
|
|
19
|
-
"test": "echo \"Error: run tests from root\" && exit 0",
|
|
20
|
-
"build": "npm run build:prod && npm run build:dev",
|
|
21
|
-
"build:prod": "webpack build --config ./webpack.config.js ./scripts/create-entrypoints.js --merge --mode production",
|
|
22
|
-
"build:dev": "webpack build --config ./webpack.config.js ./scripts/create-entrypoints.js --merge --mode development"
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
// iterate over all colorschemes
|
|
26
|
-
fs.readdirSync(path.resolve('src', 'styles', 'colorschemes')).forEach((c) => {
|
|
27
|
-
let scheme = c.substring(0, c.indexOf('.')).replace(' ', '');
|
|
28
|
-
|
|
29
|
-
// add build scripts for each colorscheme
|
|
30
|
-
scripts[`build:${scheme}`] = `npm run build:${scheme}:prod && npm run build:${scheme}:dev`;
|
|
31
|
-
scripts[`build:${scheme}:prod`] = `webpack build --config ./webpack.config.js ./entry/${scheme}.js --merge --mode production`;
|
|
32
|
-
scripts[`build:${scheme}:dev`] = `webpack build --config ./webpack.config.js ./entry/${scheme}.js --merge --mode development`;
|
|
33
|
-
|
|
34
|
-
// add serve scripts for each colorscheme
|
|
35
|
-
scripts[`serve:${scheme}`] = `set NODE_OPTIONS='--scheme false' && webpack serve --config ./webpack.config.js ./entry/${scheme}.js ./scripts/webpack.test.js --merge`;
|
|
36
|
-
scripts[`serve:${scheme}:quick`] = `set NODE_OPTIONS='--no-jshint --no-audit --no-a11y --scheme false' && webpack serve --config ./webpack.config.js ./entry/${scheme}.js ./scripts/webpack.test.js --merge`;
|
|
37
|
-
|
|
38
|
-
})
|
|
39
|
-
|
|
40
|
-
// update scripts in package.json
|
|
41
|
-
pkg.scripts = scripts;
|
|
42
|
-
|
|
43
|
-
// write package.json file
|
|
44
|
-
fs.writeFileSync(
|
|
45
|
-
'package.json',
|
|
46
|
-
JSON.stringify( pkg, null, 4 )
|
|
47
|
-
)
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* External Dependencies
|
|
3
|
-
*/
|
|
4
|
-
import fs from 'fs';
|
|
5
|
-
import path from 'path';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Internal dependencies
|
|
9
|
-
*/
|
|
10
|
-
import CAWebHTMLPlugin from '../index.js';
|
|
11
|
-
|
|
12
|
-
const componentDir = path.join(process.cwd(), 'sample', 'components');
|
|
13
|
-
|
|
14
|
-
let plugins = [];
|
|
15
|
-
|
|
16
|
-
fs.readdirSync(componentDir).forEach((c) => {
|
|
17
|
-
let p = fs.readFileSync( path.join(componentDir, c) ).toString();
|
|
18
|
-
let t = c.replace(/\.*/, '').replace('-', ' ');
|
|
19
|
-
|
|
20
|
-
plugins.push(
|
|
21
|
-
new CAWebHTMLPlugin({
|
|
22
|
-
filename: `components/${c}`,
|
|
23
|
-
title: t.charAt(0).toUpperCase() + t.substring(1),
|
|
24
|
-
templateParameters: {
|
|
25
|
-
scheme: false, // we use the entrypoints for testing
|
|
26
|
-
bodyHtmlSnippet: p,
|
|
27
|
-
},
|
|
28
|
-
skipAssets: [
|
|
29
|
-
/.*-rtl.css/, // we skip the Right-to-Left Styles
|
|
30
|
-
/css-audit.*/, // we skip the CSSAudit Files
|
|
31
|
-
/a11y.*/, // we skip the A11y Files
|
|
32
|
-
/jshint.*/, // we skip the JSHint Files
|
|
33
|
-
/font-only.*/, // we skip the font-only Files
|
|
34
|
-
]
|
|
35
|
-
})
|
|
36
|
-
)
|
|
37
|
-
})
|
|
38
|
-
|
|
39
|
-
export default {
|
|
40
|
-
plugins
|
|
41
|
-
};
|
package/plugins/jshint/.customrc
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"boss": true,
|
|
3
|
-
"curly": true,
|
|
4
|
-
"eqeqeq": true,
|
|
5
|
-
"eqnull": true,
|
|
6
|
-
"esversion": 11,
|
|
7
|
-
"expr": true,
|
|
8
|
-
"immed": true,
|
|
9
|
-
"noarg": true,
|
|
10
|
-
"nonbsp": true,
|
|
11
|
-
"quotmark": "single",
|
|
12
|
-
"undef": true,
|
|
13
|
-
"unused": true,
|
|
14
|
-
"browser": true,
|
|
15
|
-
"globals": {
|
|
16
|
-
"_": false,
|
|
17
|
-
"Backbone": false,
|
|
18
|
-
"jQuery": false,
|
|
19
|
-
"JSON": false,
|
|
20
|
-
"wp": false,
|
|
21
|
-
"export": false,
|
|
22
|
-
"module": false,
|
|
23
|
-
"require": false,
|
|
24
|
-
"WorkerGlobalScope": false,
|
|
25
|
-
"self": false,
|
|
26
|
-
"OffscreenCanvas": false,
|
|
27
|
-
"Promise": false
|
|
28
|
-
}
|
|
29
|
-
}
|
package/plugins/jshint/.jshintrc
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"boss": true,
|
|
3
|
-
"curly": true,
|
|
4
|
-
"eqeqeq": true,
|
|
5
|
-
"eqnull": true,
|
|
6
|
-
"esversion": 11,
|
|
7
|
-
"expr": true,
|
|
8
|
-
"immed": true,
|
|
9
|
-
"noarg": true,
|
|
10
|
-
"nonbsp": true,
|
|
11
|
-
"quotmark": "single",
|
|
12
|
-
"undef": true,
|
|
13
|
-
"unused": true,
|
|
14
|
-
|
|
15
|
-
"browser": true,
|
|
16
|
-
|
|
17
|
-
"globals": {
|
|
18
|
-
"_": false,
|
|
19
|
-
"Backbone": false,
|
|
20
|
-
"jQuery": false,
|
|
21
|
-
"JSON": false,
|
|
22
|
-
"wp": false,
|
|
23
|
-
"export": false,
|
|
24
|
-
"module": false,
|
|
25
|
-
"require": false,
|
|
26
|
-
"WorkerGlobalScope": false,
|
|
27
|
-
"self": false,
|
|
28
|
-
"OffscreenCanvas": false,
|
|
29
|
-
"Promise": false
|
|
30
|
-
}
|
|
31
|
-
}
|