@zohodesk/react-cli 0.0.1-exp.168.2 → 0.0.1-exp.168.3
Sign up to get free protection for your applications and to get access to all the features.
- package/.eslintignore +7 -7
- package/.eslintrc.js +179 -179
- package/README.md +925 -918
- package/bin/cli.js +492 -492
- package/cert/Tsicsezwild-22-23.crt +37 -37
- package/cert/Tsicsezwild-22-23.key +27 -27
- package/docs/CustomChunks.md +26 -26
- package/docs/DevStart.md +18 -18
- package/docs/InstallNode.md +28 -28
- package/docs/TODOS.md +10 -10
- package/docs/ValueReplacer.md +60 -60
- package/docs/warnings_while_install.txt +35 -35
- package/files/eslintrc.js +62 -62
- package/files/prettierrc.js +3 -3
- package/lib/configs/webpack.css.umd.config.js +4 -4
- package/lib/configs/webpack.prod.config.js +1 -1
- package/lib/loaderUtils/configsAssetsLoaders.js +33 -33
- package/lib/loaders/workerLoader.js +9 -9
- package/lib/pluginUtils/getDevPlugins.js +5 -5
- package/lib/pluginUtils/getProdPlugins.js +5 -5
- package/lib/plugins/EFCPlugin.md +6 -6
- package/lib/plugins/I18NInjectIntoIndexPlugin.js +4 -4
- package/lib/plugins/I18nSplitPlugin/I18nDownlodLogic.js +38 -38
- package/lib/plugins/I18nSplitPlugin/I18nFilesEmitter.js +30 -30
- package/lib/plugins/I18nSplitPlugin/I18nKeysIdentifer.js +8 -8
- package/lib/plugins/I18nSplitPlugin/I18nSplit.md +86 -86
- package/lib/plugins/I18nSplitPlugin/README.md +25 -25
- package/lib/plugins/I18nSplitPlugin/index.js +57 -57
- package/lib/plugins/ResourceHintsPlugin.js +17 -17
- package/lib/plugins/RtlSplitPlugin/RtlCssPlugin.js +6 -6
- package/lib/plugins/RtlSplitPlugin/RtrSplit.md +30 -30
- package/lib/plugins/ServiceWorkerPlugin.js +9 -9
- package/lib/plugins/TPHashMappingPlugin.js +4 -4
- package/lib/postcss-plugins/RTLSplitPlugin.js +10 -10
- package/lib/postcss-plugins/hoverActivePlugin.js +324 -231
- package/lib/postcss-plugins/keyframesPlugin.js +20 -20
- package/lib/sh/pre-commit.sh +34 -34
- package/lib/sh/reportPublish.sh +45 -45
- package/lib/utils/buildstats.html +148 -148
- package/lib/utils/resultSchema.json +73 -73
- package/npm8.md +9 -9
- package/package.json +148 -148
- package/postpublish.js +6 -6
- package/templates/app/.eslintrc.js +140 -140
- package/templates/app/README.md +12 -12
- package/templates/app/app/index.html +24 -24
- package/templates/app/app/properties/ApplicationResources_en_US.properties +1 -1
- package/templates/app/app/properties/i18nkeys.json +3 -3
- package/templates/app/docs/all.html +69 -69
- package/templates/app/mockapi/index.js +18 -18
- package/templates/app/package.json +37 -37
- package/templates/app/src/actions/SampleActions/index.js +37 -37
- package/templates/app/src/actions/index.js +65 -65
- package/templates/app/src/appUrls.js +19 -19
- package/templates/app/src/components/Alert/Alert.js +134 -134
- package/templates/app/src/components/Alert/Alert.module.css +79 -79
- package/templates/app/src/components/FreezeLayer/FreezeLayer.css +37 -37
- package/templates/app/src/components/FreezeLayer/FreezeLayer.js +84 -84
- package/templates/app/src/components/Sample/Sample.module.css +11 -11
- package/templates/app/src/components/Sample/SampleList.js +61 -61
- package/templates/app/src/components/Slider/Slider.css +41 -41
- package/templates/app/src/components/Slider/Slider.js +55 -55
- package/templates/app/src/containers/AlertContainer/index.js +15 -15
- package/templates/app/src/containers/AppContainer/index.js +96 -96
- package/templates/app/src/containers/AppContainer/index.module.css +27 -27
- package/templates/app/src/containers/CustomMatch/index.js +65 -65
- package/templates/app/src/containers/DevTools/index.js +10 -10
- package/templates/app/src/containers/Header/index.js +67 -67
- package/templates/app/src/containers/Header/index.module.css +43 -43
- package/templates/app/src/containers/Redirect/index.js +63 -63
- package/templates/app/src/containers/Redirector/index.js +47 -47
- package/templates/app/src/containers/SampleListContainer/ListContainer.js +42 -42
- package/templates/app/src/containers/SampleListContainer/ListContainer.module.css +3 -3
- package/templates/app/src/historyChange.js +5 -5
- package/templates/app/src/index.html +10 -10
- package/templates/app/src/index.js +24 -24
- package/templates/app/src/middleware/PromiseMiddleware.js +59 -59
- package/templates/app/src/reducers/alertData.js +11 -11
- package/templates/app/src/reducers/index.js +6 -6
- package/templates/app/src/reducers/samples.js +19 -19
- package/templates/app/src/store/configureStore.dev.js +51 -51
- package/templates/app/src/store/configureStore.js +5 -5
- package/templates/app/src/store/configureStore.prod.js +26 -26
- package/templates/app/src/util/Common.js +5 -5
- package/templates/app/src/util/RequestAPI.js +132 -132
- package/templates/docs/all.html +249 -249
- package/templates/docs/component.html +178 -178
- package/templates/docs/components.html +221 -221
- package/templates/docs/css/b.min.css +6 -6
- package/templates/docs/css/component.css +42 -42
- package/templates/docs/css/componentTest.css +6 -6
- package/templates/docs/css/hopscotch.css +585 -585
- package/templates/docs/css/style.css +1022 -1022
- package/templates/docs/impactReportTemplate.html +154 -154
- package/templates/docs/index.html +1493 -1493
- package/templates/docs/js/active-line.js +72 -72
- package/templates/docs/js/b.min.js +7 -7
- package/templates/docs/js/codemirror.js +9680 -9680
- package/templates/docs/js/designTokens.js +334 -334
- package/templates/docs/js/j.min.js +4 -4
- package/templates/docs/js/javascript.js +874 -874
- package/templates/docs/js/matchbrackets.js +145 -145
@@ -6,12 +6,12 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
6
6
|
|
7
7
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
8
8
|
|
9
|
-
module.exports = _postcss.default.plugin(
|
9
|
+
module.exports = _postcss.default.plugin('postcss-reduced-motion', () => {
|
10
10
|
function animDeclPosn(rule) {
|
11
11
|
let posn = -1;
|
12
12
|
rule.walkDecls((decl, index) => {
|
13
13
|
//console.log(decl.prop, " " , decl.value);
|
14
|
-
if (decl.prop.includes(
|
14
|
+
if (decl.prop.includes('animation')) {
|
15
15
|
//console.log(decl.prop," selected")
|
16
16
|
posn = index;
|
17
17
|
}
|
@@ -22,12 +22,12 @@ module.exports = _postcss.default.plugin("postcss-reduced-motion", () => {
|
|
22
22
|
return root => {
|
23
23
|
let redRules = [];
|
24
24
|
root.walkAtRules((atrule, index) => {
|
25
|
-
if (index
|
25
|
+
if (index !== 0) {
|
26
26
|
//ignore case
|
27
27
|
let ignore = false;
|
28
28
|
|
29
|
-
if (root.nodes[index - 1].type
|
30
|
-
ignore = root.nodes[index - 1].text.includes(
|
29
|
+
if (root.nodes[index - 1].type === 'comment') {
|
30
|
+
ignore = root.nodes[index - 1].text.includes('reduced-motion:ignore');
|
31
31
|
} //animation none push to reduced motion
|
32
32
|
|
33
33
|
|
@@ -36,11 +36,11 @@ module.exports = _postcss.default.plugin("postcss-reduced-motion", () => {
|
|
36
36
|
atrule.walkRules(rule => {
|
37
37
|
let pos = animDeclPosn(rule);
|
38
38
|
|
39
|
-
if (pos
|
39
|
+
if (pos !== -1) {
|
40
40
|
let ruleNew = rule.clone();
|
41
41
|
let decl = ruleNew.nodes[pos];
|
42
42
|
let declClone = decl.clone();
|
43
|
-
declClone.value =
|
43
|
+
declClone.value = 'none';
|
44
44
|
ruleNew.walkDecls(declVal => declVal.remove());
|
45
45
|
ruleNew.append(declClone);
|
46
46
|
let atRuleNew = atrule.clone();
|
@@ -56,11 +56,11 @@ module.exports = _postcss.default.plugin("postcss-reduced-motion", () => {
|
|
56
56
|
atrule.walkRules(rule => {
|
57
57
|
let pos = animDeclPosn(rule);
|
58
58
|
|
59
|
-
if (pos
|
59
|
+
if (pos !== -1) {
|
60
60
|
let ruleNew = rule.clone();
|
61
61
|
let decl = ruleNew.nodes[pos];
|
62
62
|
let declClone = decl.clone();
|
63
|
-
declClone.value =
|
63
|
+
declClone.value = 'none';
|
64
64
|
ruleNew.walkDecls(declVal => declVal.remove());
|
65
65
|
ruleNew.append(declClone);
|
66
66
|
let atRuleNew = atrule.clone();
|
@@ -72,23 +72,23 @@ module.exports = _postcss.default.plugin("postcss-reduced-motion", () => {
|
|
72
72
|
}
|
73
73
|
});
|
74
74
|
root.walkRules((rule, index) => {
|
75
|
-
if (rule.type ===
|
76
|
-
if (index
|
75
|
+
if (rule.type === 'rule' && rule.parent.name === undefined) {
|
76
|
+
if (index !== 0) {
|
77
77
|
//ignore case
|
78
78
|
let ignore = false;
|
79
79
|
|
80
|
-
if (root.nodes[index - 1].type
|
81
|
-
ignore = root.nodes[index - 1].text.includes(
|
80
|
+
if (root.nodes[index - 1].type === 'comment') {
|
81
|
+
ignore = root.nodes[index - 1].text.includes('reduced-motion:ignore');
|
82
82
|
} //animation none push to reduced motion
|
83
83
|
|
84
84
|
|
85
85
|
if (!ignore) {
|
86
86
|
//console.log(atrule)
|
87
87
|
rule.walkDecls(decl => {
|
88
|
-
if (decl
|
88
|
+
if (decl !== undefined && decl.prop.includes('animation')) {
|
89
89
|
let declClone = decl.clone();
|
90
90
|
let newRule = rule.clone();
|
91
|
-
declClone.value =
|
91
|
+
declClone.value = 'none';
|
92
92
|
newRule.walkDecls(declVal => declVal.remove());
|
93
93
|
newRule.append(declClone);
|
94
94
|
redRules.push(newRule);
|
@@ -99,10 +99,10 @@ module.exports = _postcss.default.plugin("postcss-reduced-motion", () => {
|
|
99
99
|
//animation none push to reduced motion
|
100
100
|
//console.log(atrule)
|
101
101
|
rule.walkDecls(decl => {
|
102
|
-
if (decl
|
102
|
+
if (decl !== undefined && decl.prop.includes('animation')) {
|
103
103
|
let declClone = decl.clone();
|
104
104
|
let newRule = rule.clone();
|
105
|
-
declClone.value =
|
105
|
+
declClone.value = 'none';
|
106
106
|
newRule.walkDecls(declVal => declVal.remove());
|
107
107
|
newRule.append(declClone);
|
108
108
|
redRules.push(newRule);
|
@@ -114,11 +114,11 @@ module.exports = _postcss.default.plugin("postcss-reduced-motion", () => {
|
|
114
114
|
|
115
115
|
if (redRules.length > 0) {
|
116
116
|
let redMtnQuery = (0, _postcss.atRule)({
|
117
|
-
name:
|
118
|
-
params:
|
117
|
+
name: 'media',
|
118
|
+
params: '(prefers-reduced-motion)'
|
119
119
|
});
|
120
120
|
root.append(redMtnQuery).last;
|
121
|
-
redRules.
|
121
|
+
redRules.forEach(rule => {
|
122
122
|
redMtnQuery.append(rule);
|
123
123
|
});
|
124
124
|
}
|
package/lib/sh/pre-commit.sh
CHANGED
@@ -1,34 +1,34 @@
|
|
1
|
-
#!/bin/sh
|
2
|
-
|
3
|
-
STAGED_FILES=$(git diff --cached --name-only --diff-filter=ACM | grep -E "\.(js)$") # Get staged files
|
4
|
-
|
5
|
-
CURRENT_BRANCH=$(git branch | sed -n -e 's/^\* \(.*\)/\1/p') # Get branch name
|
6
|
-
|
7
|
-
echo "Branch Name - $CURRENT_BRANCH"
|
8
|
-
|
9
|
-
if [[ "$STAGED_FILES" = "" ]]; then
|
10
|
-
exit 0
|
11
|
-
fi
|
12
|
-
|
13
|
-
IS_FAILED=false
|
14
|
-
FILES=""
|
15
|
-
|
16
|
-
for FILE in $STAGED_FILES # Add files with space separation
|
17
|
-
do
|
18
|
-
FILES+="$FILE "
|
19
|
-
done
|
20
|
-
|
21
|
-
npm run lint --prefix ${PREFIX_PATH} $FILES # Run ESLint
|
22
|
-
|
23
|
-
if [[ "$?" != 0 ]]; then
|
24
|
-
IS_FAILED=true
|
25
|
-
fi
|
26
|
-
|
27
|
-
if $IS_FAILED; then
|
28
|
-
echo "\033[41mCOMMIT FAILED:\033[0m Your commit contains files that should pass ESLint but do not. Please fix the ESLint errors and try again.\n"
|
29
|
-
exit 1
|
30
|
-
else
|
31
|
-
echo "\033[42mCOMMIT SUCCEEDED\033[0m\n"
|
32
|
-
fi
|
33
|
-
|
34
|
-
exit $?
|
1
|
+
#!/bin/sh
|
2
|
+
|
3
|
+
STAGED_FILES=$(git diff --cached --name-only --diff-filter=ACM | grep -E "\.(js)$") # Get staged files
|
4
|
+
|
5
|
+
CURRENT_BRANCH=$(git branch | sed -n -e 's/^\* \(.*\)/\1/p') # Get branch name
|
6
|
+
|
7
|
+
echo "Branch Name - $CURRENT_BRANCH"
|
8
|
+
|
9
|
+
if [[ "$STAGED_FILES" = "" ]]; then
|
10
|
+
exit 0
|
11
|
+
fi
|
12
|
+
|
13
|
+
IS_FAILED=false
|
14
|
+
FILES=""
|
15
|
+
|
16
|
+
for FILE in $STAGED_FILES # Add files with space separation
|
17
|
+
do
|
18
|
+
FILES+="$FILE "
|
19
|
+
done
|
20
|
+
|
21
|
+
npm run lint --prefix ${PREFIX_PATH} $FILES # Run ESLint
|
22
|
+
|
23
|
+
if [[ "$?" != 0 ]]; then
|
24
|
+
IS_FAILED=true
|
25
|
+
fi
|
26
|
+
|
27
|
+
if $IS_FAILED; then
|
28
|
+
echo "\033[41mCOMMIT FAILED:\033[0m Your commit contains files that should pass ESLint but do not. Please fix the ESLint errors and try again.\n"
|
29
|
+
exit 1
|
30
|
+
else
|
31
|
+
echo "\033[42mCOMMIT SUCCEEDED\033[0m\n"
|
32
|
+
fi
|
33
|
+
|
34
|
+
exit $?
|
package/lib/sh/reportPublish.sh
CHANGED
@@ -1,45 +1,45 @@
|
|
1
|
-
#!/bin/bash
|
2
|
-
branchName=$2
|
3
|
-
url=$1
|
4
|
-
zipUrl=$3
|
5
|
-
unique=$(date +"%d_%m_%y_Time_%H_%M_%S")
|
6
|
-
publishFolder=$branchName"_"$unique
|
7
|
-
|
8
|
-
rm -rf ./reports
|
9
|
-
rm -rf ./scrTemplate
|
10
|
-
rm -rf ./errTemplate
|
11
|
-
rm -rf ./css
|
12
|
-
rm -rf ./js
|
13
|
-
rm -rf ./index.html
|
14
|
-
|
15
|
-
curl $zipUrl | tar xz
|
16
|
-
|
17
|
-
cp -rf ./reports/css ./css
|
18
|
-
cp -rf ./reports/js ./js
|
19
|
-
cp -rf ./reports/index.html ./index.html
|
20
|
-
if [ -d "./screenShots" ] ; then
|
21
|
-
cp -rf ./scrTemplate/* ./screenShots/
|
22
|
-
else
|
23
|
-
mkdir ./screenShots
|
24
|
-
cp -rf ./scrTemplate/* ./screenShots/
|
25
|
-
fi
|
26
|
-
|
27
|
-
[ ! -f "./result.json" ] && touch result.json && cp -rf ./errTemplate/* ./result.json
|
28
|
-
[ ! -d "./commitCoverage" ] && mkdir commitCoverage && cp -rf ./errTemplate/* ./commitCoverage/
|
29
|
-
[ ! -d "./unittest" ] && mkdir unittest && cp -rf ./errTemplate/* ./unittest/
|
30
|
-
[ ! -d "./coverageTest" ] && mkdir coverageTest && cp -rf ./errTemplate/* ./coverageTest/
|
31
|
-
[ ! -d "./coverage" ] && mkdir coverage && cp -rf ./errTemplate/* ./coverage/
|
32
|
-
|
33
|
-
tar -czvf $publishFolder.tar.gz coverage screenShots unittest coverageTest commitCoverage ./css ./js ./index.html ./result.json
|
34
|
-
|
35
|
-
curl -i -F name=file -F file=@$publishFolder.tar.gz $url"/cgi-bin/upload.py"
|
36
|
-
replace=$publishFolder
|
37
|
-
reportUrl=$url"/"$replace
|
38
|
-
subject="Client Report - React - $publishFolder"
|
39
|
-
msg="<p><b>Report URL - <a href='$reportUrl'>Link</a></b></p>
|
40
|
-
<p><b>Report Branchname - $branchName</b></p>
|
41
|
-
<p><b>Report Unique ID - $unique</b></p>
|
42
|
-
<p><b>Report Developer - $6</b></p>"
|
43
|
-
#node mailSender.js <from> <pass> <to> <subject> <text>
|
44
|
-
BASEDIR=$(dirname "$0")
|
45
|
-
node $BASEDIR"/../utils/mailSender" $4 $5 $6 "$subject" "$msg" $7 $8 "$reportUrl"
|
1
|
+
#!/bin/bash
|
2
|
+
branchName=$2
|
3
|
+
url=$1
|
4
|
+
zipUrl=$3
|
5
|
+
unique=$(date +"%d_%m_%y_Time_%H_%M_%S")
|
6
|
+
publishFolder=$branchName"_"$unique
|
7
|
+
|
8
|
+
rm -rf ./reports
|
9
|
+
rm -rf ./scrTemplate
|
10
|
+
rm -rf ./errTemplate
|
11
|
+
rm -rf ./css
|
12
|
+
rm -rf ./js
|
13
|
+
rm -rf ./index.html
|
14
|
+
|
15
|
+
curl $zipUrl | tar xz
|
16
|
+
|
17
|
+
cp -rf ./reports/css ./css
|
18
|
+
cp -rf ./reports/js ./js
|
19
|
+
cp -rf ./reports/index.html ./index.html
|
20
|
+
if [ -d "./screenShots" ] ; then
|
21
|
+
cp -rf ./scrTemplate/* ./screenShots/
|
22
|
+
else
|
23
|
+
mkdir ./screenShots
|
24
|
+
cp -rf ./scrTemplate/* ./screenShots/
|
25
|
+
fi
|
26
|
+
|
27
|
+
[ ! -f "./result.json" ] && touch result.json && cp -rf ./errTemplate/* ./result.json
|
28
|
+
[ ! -d "./commitCoverage" ] && mkdir commitCoverage && cp -rf ./errTemplate/* ./commitCoverage/
|
29
|
+
[ ! -d "./unittest" ] && mkdir unittest && cp -rf ./errTemplate/* ./unittest/
|
30
|
+
[ ! -d "./coverageTest" ] && mkdir coverageTest && cp -rf ./errTemplate/* ./coverageTest/
|
31
|
+
[ ! -d "./coverage" ] && mkdir coverage && cp -rf ./errTemplate/* ./coverage/
|
32
|
+
|
33
|
+
tar -czvf $publishFolder.tar.gz coverage screenShots unittest coverageTest commitCoverage ./css ./js ./index.html ./result.json
|
34
|
+
|
35
|
+
curl -i -F name=file -F file=@$publishFolder.tar.gz $url"/cgi-bin/upload.py"
|
36
|
+
replace=$publishFolder
|
37
|
+
reportUrl=$url"/"$replace
|
38
|
+
subject="Client Report - React - $publishFolder"
|
39
|
+
msg="<p><b>Report URL - <a href='$reportUrl'>Link</a></b></p>
|
40
|
+
<p><b>Report Branchname - $branchName</b></p>
|
41
|
+
<p><b>Report Unique ID - $unique</b></p>
|
42
|
+
<p><b>Report Developer - $6</b></p>"
|
43
|
+
#node mailSender.js <from> <pass> <to> <subject> <text>
|
44
|
+
BASEDIR=$(dirname "$0")
|
45
|
+
node $BASEDIR"/../utils/mailSender" $4 $5 $6 "$subject" "$msg" $7 $8 "$reportUrl"
|
@@ -1,148 +1,148 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252" />
|
5
|
-
<style>
|
6
|
-
#file {
|
7
|
-
font-family: 'Trebuchet MS', Arial, Helvetica, sans-serif;
|
8
|
-
border-collapse: collapse;
|
9
|
-
width: 100%;
|
10
|
-
}
|
11
|
-
#redTd {
|
12
|
-
color: red;
|
13
|
-
}
|
14
|
-
#greenTD {
|
15
|
-
color: green;
|
16
|
-
}
|
17
|
-
#file td,
|
18
|
-
#file th {
|
19
|
-
border: 1px solid #ddd;
|
20
|
-
padding: 8px;
|
21
|
-
text-align: center;
|
22
|
-
}
|
23
|
-
|
24
|
-
#file tr:nth-child(even) {
|
25
|
-
background-color: #f2f2f2;
|
26
|
-
}
|
27
|
-
|
28
|
-
#file tr:hover {
|
29
|
-
background-color: #ddd;
|
30
|
-
}
|
31
|
-
|
32
|
-
#file th {
|
33
|
-
padding-top: 12px;
|
34
|
-
padding-bottom: 12px;
|
35
|
-
background-color: #2a2d36;
|
36
|
-
color: white;
|
37
|
-
}
|
38
|
-
#sizeTable {
|
39
|
-
float: left;
|
40
|
-
width: 50%;
|
41
|
-
}
|
42
|
-
#hashTable {
|
43
|
-
display: inline-block;
|
44
|
-
width: 50%;
|
45
|
-
}
|
46
|
-
</style>
|
47
|
-
<script type="text/javascript" src="./buildtrack.js"></script>
|
48
|
-
</head>
|
49
|
-
<body>
|
50
|
-
<div>
|
51
|
-
<div style="float: left;margin-right: 10px;">Branch Name:</div>
|
52
|
-
<h4 id="h4" style="margin: 0px;"></h4>
|
53
|
-
</div>
|
54
|
-
<div id="sizeTable">
|
55
|
-
<div>
|
56
|
-
<h3>Size changes</h3>
|
57
|
-
<h3></h3>
|
58
|
-
</div>
|
59
|
-
<table id="file" class="table table-bordered table-hover table-condensed">
|
60
|
-
<thead>
|
61
|
-
<tr>
|
62
|
-
<th title="Field #1">Name</th>
|
63
|
-
<th title="Field #2">Size / Diff</th>
|
64
|
-
<th title="Field #3">Size / Old</th>
|
65
|
-
<th title="Field #4">Size / New</th>
|
66
|
-
</tr>
|
67
|
-
</thead>
|
68
|
-
<tbody id="sizeTbody"></tbody>
|
69
|
-
</table>
|
70
|
-
</div>
|
71
|
-
<div id="hashTable">
|
72
|
-
<div>
|
73
|
-
<h3>Hash changes</h3>
|
74
|
-
<h3></h3>
|
75
|
-
</div>
|
76
|
-
<table id="file" class="table table-bordered table-hover table-condensed">
|
77
|
-
<thead>
|
78
|
-
<tr>
|
79
|
-
<th style="background-color: #4CAF50;" title="Field #1">Name</th>
|
80
|
-
<th style="background-color: #4CAF50;" title="Field #2">
|
81
|
-
Hash / Old
|
82
|
-
</th>
|
83
|
-
<th style="background-color: #4CAF50;" title="Field #3">
|
84
|
-
Hash / New
|
85
|
-
</th>
|
86
|
-
</tr>
|
87
|
-
</thead>
|
88
|
-
<tbody id="hashTbody"></tbody>
|
89
|
-
</table>
|
90
|
-
</div>
|
91
|
-
|
92
|
-
<script type="text/javascript">
|
93
|
-
function load() {
|
94
|
-
if (statsJson) {
|
95
|
-
var tdStringSize = '';
|
96
|
-
var tdStringHash = '';
|
97
|
-
if (statsJson.increased.length > 0) {
|
98
|
-
statsJson.increased.forEach(fileObj => {
|
99
|
-
let colorTD = '</td><td>';
|
100
|
-
if (fileObj.size.diff.split(' ').length > 2) {
|
101
|
-
colorTD = '</td><td id="greenTd">';
|
102
|
-
} else {
|
103
|
-
colorTD = '</td><td id="redTd">';
|
104
|
-
}
|
105
|
-
|
106
|
-
tdStringSize =
|
107
|
-
tdStringSize +
|
108
|
-
'<tr><td>' +
|
109
|
-
fileObj.name +
|
110
|
-
colorTD +
|
111
|
-
fileObj.size.diff +
|
112
|
-
'</td><td>' +
|
113
|
-
fileObj.size.old +
|
114
|
-
'</td><td>' +
|
115
|
-
fileObj.size.new +
|
116
|
-
'</td><tr>';
|
117
|
-
});
|
118
|
-
} else {
|
119
|
-
tdStringSize = '<tr><td></td><td></td><td></td></tr>';
|
120
|
-
}
|
121
|
-
document.getElementById('sizeTbody').innerHTML = tdStringSize;
|
122
|
-
if (statsJson.hashChanged.length > 0) {
|
123
|
-
statsJson.hashChanged.forEach(fileObj => {
|
124
|
-
tdStringHash =
|
125
|
-
tdStringHash +
|
126
|
-
'<tr><td>' +
|
127
|
-
fileObj.name +
|
128
|
-
'</td><td>' +
|
129
|
-
fileObj.hash.old +
|
130
|
-
'</td><td>' +
|
131
|
-
fileObj.hash.new +
|
132
|
-
'</td><tr>';
|
133
|
-
});
|
134
|
-
} else {
|
135
|
-
tdStringHash = '<tr><td></td><td></td><td></td></tr>';
|
136
|
-
}
|
137
|
-
document.getElementById('hashTbody').innerHTML = tdStringHash;
|
138
|
-
if (statsJson.branchName) {
|
139
|
-
document.getElementById('h4').innerHTML = statsJson.branchName;
|
140
|
-
} else {
|
141
|
-
document.getElementById('h4').innerHTML = 'Not specified';
|
142
|
-
}
|
143
|
-
}
|
144
|
-
}
|
145
|
-
load();
|
146
|
-
</script>
|
147
|
-
</body>
|
148
|
-
</html>
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252" />
|
5
|
+
<style>
|
6
|
+
#file {
|
7
|
+
font-family: 'Trebuchet MS', Arial, Helvetica, sans-serif;
|
8
|
+
border-collapse: collapse;
|
9
|
+
width: 100%;
|
10
|
+
}
|
11
|
+
#redTd {
|
12
|
+
color: red;
|
13
|
+
}
|
14
|
+
#greenTD {
|
15
|
+
color: green;
|
16
|
+
}
|
17
|
+
#file td,
|
18
|
+
#file th {
|
19
|
+
border: 1px solid #ddd;
|
20
|
+
padding: 8px;
|
21
|
+
text-align: center;
|
22
|
+
}
|
23
|
+
|
24
|
+
#file tr:nth-child(even) {
|
25
|
+
background-color: #f2f2f2;
|
26
|
+
}
|
27
|
+
|
28
|
+
#file tr:hover {
|
29
|
+
background-color: #ddd;
|
30
|
+
}
|
31
|
+
|
32
|
+
#file th {
|
33
|
+
padding-top: 12px;
|
34
|
+
padding-bottom: 12px;
|
35
|
+
background-color: #2a2d36;
|
36
|
+
color: white;
|
37
|
+
}
|
38
|
+
#sizeTable {
|
39
|
+
float: left;
|
40
|
+
width: 50%;
|
41
|
+
}
|
42
|
+
#hashTable {
|
43
|
+
display: inline-block;
|
44
|
+
width: 50%;
|
45
|
+
}
|
46
|
+
</style>
|
47
|
+
<script type="text/javascript" src="./buildtrack.js"></script>
|
48
|
+
</head>
|
49
|
+
<body>
|
50
|
+
<div>
|
51
|
+
<div style="float: left;margin-right: 10px;">Branch Name:</div>
|
52
|
+
<h4 id="h4" style="margin: 0px;"></h4>
|
53
|
+
</div>
|
54
|
+
<div id="sizeTable">
|
55
|
+
<div>
|
56
|
+
<h3>Size changes</h3>
|
57
|
+
<h3></h3>
|
58
|
+
</div>
|
59
|
+
<table id="file" class="table table-bordered table-hover table-condensed">
|
60
|
+
<thead>
|
61
|
+
<tr>
|
62
|
+
<th title="Field #1">Name</th>
|
63
|
+
<th title="Field #2">Size / Diff</th>
|
64
|
+
<th title="Field #3">Size / Old</th>
|
65
|
+
<th title="Field #4">Size / New</th>
|
66
|
+
</tr>
|
67
|
+
</thead>
|
68
|
+
<tbody id="sizeTbody"></tbody>
|
69
|
+
</table>
|
70
|
+
</div>
|
71
|
+
<div id="hashTable">
|
72
|
+
<div>
|
73
|
+
<h3>Hash changes</h3>
|
74
|
+
<h3></h3>
|
75
|
+
</div>
|
76
|
+
<table id="file" class="table table-bordered table-hover table-condensed">
|
77
|
+
<thead>
|
78
|
+
<tr>
|
79
|
+
<th style="background-color: #4CAF50;" title="Field #1">Name</th>
|
80
|
+
<th style="background-color: #4CAF50;" title="Field #2">
|
81
|
+
Hash / Old
|
82
|
+
</th>
|
83
|
+
<th style="background-color: #4CAF50;" title="Field #3">
|
84
|
+
Hash / New
|
85
|
+
</th>
|
86
|
+
</tr>
|
87
|
+
</thead>
|
88
|
+
<tbody id="hashTbody"></tbody>
|
89
|
+
</table>
|
90
|
+
</div>
|
91
|
+
|
92
|
+
<script type="text/javascript">
|
93
|
+
function load() {
|
94
|
+
if (statsJson) {
|
95
|
+
var tdStringSize = '';
|
96
|
+
var tdStringHash = '';
|
97
|
+
if (statsJson.increased.length > 0) {
|
98
|
+
statsJson.increased.forEach(fileObj => {
|
99
|
+
let colorTD = '</td><td>';
|
100
|
+
if (fileObj.size.diff.split(' ').length > 2) {
|
101
|
+
colorTD = '</td><td id="greenTd">';
|
102
|
+
} else {
|
103
|
+
colorTD = '</td><td id="redTd">';
|
104
|
+
}
|
105
|
+
|
106
|
+
tdStringSize =
|
107
|
+
tdStringSize +
|
108
|
+
'<tr><td>' +
|
109
|
+
fileObj.name +
|
110
|
+
colorTD +
|
111
|
+
fileObj.size.diff +
|
112
|
+
'</td><td>' +
|
113
|
+
fileObj.size.old +
|
114
|
+
'</td><td>' +
|
115
|
+
fileObj.size.new +
|
116
|
+
'</td><tr>';
|
117
|
+
});
|
118
|
+
} else {
|
119
|
+
tdStringSize = '<tr><td></td><td></td><td></td></tr>';
|
120
|
+
}
|
121
|
+
document.getElementById('sizeTbody').innerHTML = tdStringSize;
|
122
|
+
if (statsJson.hashChanged.length > 0) {
|
123
|
+
statsJson.hashChanged.forEach(fileObj => {
|
124
|
+
tdStringHash =
|
125
|
+
tdStringHash +
|
126
|
+
'<tr><td>' +
|
127
|
+
fileObj.name +
|
128
|
+
'</td><td>' +
|
129
|
+
fileObj.hash.old +
|
130
|
+
'</td><td>' +
|
131
|
+
fileObj.hash.new +
|
132
|
+
'</td><tr>';
|
133
|
+
});
|
134
|
+
} else {
|
135
|
+
tdStringHash = '<tr><td></td><td></td><td></td></tr>';
|
136
|
+
}
|
137
|
+
document.getElementById('hashTbody').innerHTML = tdStringHash;
|
138
|
+
if (statsJson.branchName) {
|
139
|
+
document.getElementById('h4').innerHTML = statsJson.branchName;
|
140
|
+
} else {
|
141
|
+
document.getElementById('h4').innerHTML = 'Not specified';
|
142
|
+
}
|
143
|
+
}
|
144
|
+
}
|
145
|
+
load();
|
146
|
+
</script>
|
147
|
+
</body>
|
148
|
+
</html>
|