@caweb/webpack 1.3.3 → 1.3.4
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.txt +3 -0
- package/package.json +2 -2
- package/plugins/html/changelog.txt +3 -0
- package/plugins/html/helpers/string/replace.js +11 -2
- package/plugins/html/helpers/string/toLower.js +13 -3
- package/plugins/html/helpers/string/toTitleCase.js +13 -3
- package/plugins/html/helpers/string/toUpper.js +13 -3
- package/plugins/html/package-lock.json +2 -2
- package/plugins/html/package.json +1 -1
package/changelog.txt
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@caweb/webpack",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.4",
|
|
4
4
|
"description": "CAWebPublishing Webpack Configuration",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@caweb/a11y-webpack-plugin": "^1.0.9",
|
|
39
39
|
"@caweb/css-audit-webpack-plugin": "^1.0.12",
|
|
40
|
-
"@caweb/html-webpack-plugin": "^1.5.
|
|
40
|
+
"@caweb/html-webpack-plugin": "^1.5.5",
|
|
41
41
|
"@caweb/jshint-webpack-plugin": "^1.0.9"
|
|
42
42
|
}
|
|
43
43
|
}
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
export default function replace(value, search, replace){
|
|
2
|
-
|
|
2
|
+
let response = '';
|
|
3
|
+
|
|
4
|
+
// if parameter is passed
|
|
3
5
|
if( value && value.length ){
|
|
4
|
-
|
|
6
|
+
response = value.replace(new RegExp(search, "g"), replace);
|
|
5
7
|
}
|
|
8
|
+
|
|
9
|
+
// if nested content exists
|
|
10
|
+
if( value.fn && value.fn().length ){
|
|
11
|
+
response += value.fn().replace(new RegExp(search, "g"), replace);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
return response;
|
|
6
15
|
}
|
|
@@ -1,6 +1,16 @@
|
|
|
1
|
-
export default function toLower(value){
|
|
2
|
-
|
|
1
|
+
export default function toLower(value, options){
|
|
2
|
+
let response = '';
|
|
3
|
+
|
|
4
|
+
// if parameter is passed
|
|
3
5
|
if( value && value.length ){
|
|
4
|
-
|
|
6
|
+
response = value.toLowerCase();
|
|
5
7
|
}
|
|
8
|
+
|
|
9
|
+
// if nested content exists
|
|
10
|
+
if( (value.fn && value.fn().length) || (options.fn && options.fn().length ) ){
|
|
11
|
+
let content = value.fn ? value.fn() : options.fn();
|
|
12
|
+
response += content.toLowerCase();
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
return response;
|
|
6
16
|
}
|
|
@@ -1,6 +1,16 @@
|
|
|
1
|
-
export default function toTitleCase(value){
|
|
2
|
-
|
|
1
|
+
export default function toTitleCase(value, options){
|
|
2
|
+
let response = '';
|
|
3
|
+
|
|
4
|
+
// if parameter is passed
|
|
3
5
|
if( value && value.length ){
|
|
4
|
-
|
|
6
|
+
response = value.split(' ').map( w => w.charAt(0).toUpperCase() + w.slice(1) ).join(' ');
|
|
5
7
|
}
|
|
8
|
+
|
|
9
|
+
// if nested content exists
|
|
10
|
+
if( (value.fn && value.fn().length) || (options.fn && options.fn().length ) ){
|
|
11
|
+
let content = value.fn ? value.fn() : options.fn();
|
|
12
|
+
response += content.split(' ').map( w => w.charAt(0).toUpperCase() + w.slice(1) ).join(' ');
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
return response;
|
|
6
16
|
}
|
|
@@ -1,6 +1,16 @@
|
|
|
1
|
-
export default function toUpper(value){
|
|
2
|
-
|
|
1
|
+
export default function toUpper(value, options){
|
|
2
|
+
let response = '';
|
|
3
|
+
|
|
4
|
+
// if parameter is passed
|
|
3
5
|
if( value && value.length ){
|
|
4
|
-
|
|
6
|
+
response = value.toUpperCase();
|
|
5
7
|
}
|
|
8
|
+
|
|
9
|
+
// if nested content exists
|
|
10
|
+
if( (value.fn && value.fn().length) || (options.fn && options.fn().length ) ){
|
|
11
|
+
let content = value.fn ? value.fn() : options.fn();
|
|
12
|
+
response += content.toUpperCase();
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
return response;
|
|
6
16
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@caweb/html-webpack-plugin",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.5",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@caweb/html-webpack-plugin",
|
|
9
|
-
"version": "1.5.
|
|
9
|
+
"version": "1.5.5",
|
|
10
10
|
"license": "ISC",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@caweb/a11y-webpack-plugin": "^1.0.9",
|