@zohodesk/react-cli 1.1.10 → 1.1.11-exp.2
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/README.md +74 -10
- package/bin/cli.js +1 -1
- package/lib/common/runPreProcess.js +19 -14
- package/lib/configs/webpack.css.umd.config.js +3 -2
- package/lib/configs/webpack.dev.config.js +3 -0
- package/lib/configs/webpack.docs.config.js +2 -0
- package/lib/configs/webpack.impact.config.js +2 -0
- package/lib/configs/webpack.prod.config.js +3 -0
- package/lib/loaderUtils/getCSSLoaders.js +3 -2
- package/lib/logger.js +7 -0
- package/lib/pluginUtils/getProdPlugins.js +15 -2
- package/lib/plugins/StatsPlugin.js +174 -0
- package/lib/schemas/index.js +10 -1
- package/lib/utils/cssClassNameGenerate.js +38 -5
- package/lib/utils/getOptions.js +18 -2
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/templates/docs/css/style.css +136 -169
- package/templates/docs/index.html +795 -632
package/lib/utils/getOptions.js
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.default = void 0;
|
6
|
+
exports.defaulter = exports.default = void 0;
|
7
7
|
|
8
8
|
var _child_process = require("child_process");
|
9
9
|
|
@@ -15,6 +15,10 @@ var _schemas = _interopRequireDefault(require("../schemas"));
|
|
15
15
|
|
16
16
|
var _deprecationSupport = require("./deprecationSupport");
|
17
17
|
|
18
|
+
var _deprecationLogger = require("../deprecationLogger");
|
19
|
+
|
20
|
+
var _logger = require("../logger");
|
21
|
+
|
18
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
19
23
|
|
20
24
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
@@ -128,10 +132,15 @@ const defaulter = (target, source) => {
|
|
128
132
|
return defaultObject;
|
129
133
|
};
|
130
134
|
|
135
|
+
exports.defaulter = defaulter;
|
131
136
|
global.reactCLIOptions = null;
|
132
137
|
|
133
138
|
const getOptionsFromConfigFile = (appPath, configFileName) => {
|
134
|
-
const fileName = configFileName || '
|
139
|
+
const fileName = configFileName || 'react-cli.config.js';
|
140
|
+
|
141
|
+
if (!configFileName) {
|
142
|
+
(0, _logger.verboseLogger)('we have used default react-cli.config.js');
|
143
|
+
}
|
135
144
|
|
136
145
|
const packagePath = _path.default.join(appPath, fileName);
|
137
146
|
|
@@ -139,6 +148,13 @@ const getOptionsFromConfigFile = (appPath, configFileName) => {
|
|
139
148
|
return require(packagePath).config;
|
140
149
|
}
|
141
150
|
|
151
|
+
const oldDeprecatedConfigFilePath = _path.default.join(appPath, 'build.config.js');
|
152
|
+
|
153
|
+
if ((0, _fs.existsSync)(oldDeprecatedConfigFilePath)) {
|
154
|
+
(0, _deprecationLogger.deprecateMessage)('"build.config.js" file was deprecated. So Kindly rename it as "react-cli.config.js"');
|
155
|
+
return require(oldDeprecatedConfigFilePath).config;
|
156
|
+
}
|
157
|
+
|
142
158
|
return null;
|
143
159
|
};
|
144
160
|
|
package/npm-shrinkwrap.json
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"name": "@zohodesk/react-cli",
|
3
|
-
"version": "1.1.
|
3
|
+
"version": "1.1.11-exp.2",
|
4
4
|
"lockfileVersion": 2,
|
5
5
|
"requires": true,
|
6
6
|
"packages": {
|
7
7
|
"": {
|
8
8
|
"name": "@zohodesk/react-cli",
|
9
|
-
"version": "1.1.
|
9
|
+
"version": "1.1.11-exp.2",
|
10
10
|
"license": "ISC",
|
11
11
|
"dependencies": {
|
12
12
|
"@babel/cli": "7.10.5",
|
package/package.json
CHANGED
@@ -1,151 +1,4 @@
|
|
1
1
|
/* cyrillic-ext */
|
2
|
-
@font-face {
|
3
|
-
font-family: 'Regular';
|
4
|
-
font-style: normal;
|
5
|
-
font-weight: 400;
|
6
|
-
src: local('Open Sans Regular'), local('OpenSans-Regular'),
|
7
|
-
url(https://fonts.gstatic.com/s/opensans/v15/mem8YaGs126MiZpBA-UFWJ0bf8pkAp6a.woff2)
|
8
|
-
format('woff2');
|
9
|
-
unicode-range: U + 0460-052f, U + 1c80-1c88, U + 20b4, U + 2de0-2dff,
|
10
|
-
U + A640-A69F, U + FE2E-FE2F;
|
11
|
-
}
|
12
|
-
/* cyrillic */
|
13
|
-
@font-face {
|
14
|
-
font-family: 'Regular';
|
15
|
-
font-style: normal;
|
16
|
-
font-weight: 400;
|
17
|
-
src: local('Open Sans Regular'), local('OpenSans-Regular'),
|
18
|
-
url(https://fonts.gstatic.com/s/opensans/v15/mem8YaGs126MiZpBA-UFUZ0bf8pkAp6a.woff2)
|
19
|
-
format('woff2');
|
20
|
-
unicode-range: U + 0400-045f, U + 0490-0491, U + 04b0-04b1, U + 2116;
|
21
|
-
}
|
22
|
-
/* greek-ext */
|
23
|
-
@font-face {
|
24
|
-
font-family: 'Regular';
|
25
|
-
font-style: normal;
|
26
|
-
font-weight: 400;
|
27
|
-
src: local('Open Sans Regular'), local('OpenSans-Regular'),
|
28
|
-
url(https://fonts.gstatic.com/s/opensans/v15/mem8YaGs126MiZpBA-UFWZ0bf8pkAp6a.woff2)
|
29
|
-
format('woff2');
|
30
|
-
unicode-range: U + 1f00-1fff;
|
31
|
-
}
|
32
|
-
/* greek */
|
33
|
-
@font-face {
|
34
|
-
font-family: 'Regular';
|
35
|
-
font-style: normal;
|
36
|
-
font-weight: 400;
|
37
|
-
src: local('Open Sans Regular'), local('OpenSans-Regular'),
|
38
|
-
url(https://fonts.gstatic.com/s/opensans/v15/mem8YaGs126MiZpBA-UFVp0bf8pkAp6a.woff2)
|
39
|
-
format('woff2');
|
40
|
-
unicode-range: U + 0370-03ff;
|
41
|
-
}
|
42
|
-
/* vietnamese */
|
43
|
-
@font-face {
|
44
|
-
font-family: 'Regular';
|
45
|
-
font-style: normal;
|
46
|
-
font-weight: 400;
|
47
|
-
src: local('Open Sans Regular'), local('OpenSans-Regular'),
|
48
|
-
url(https://fonts.gstatic.com/s/opensans/v15/mem8YaGs126MiZpBA-UFWp0bf8pkAp6a.woff2)
|
49
|
-
format('woff2');
|
50
|
-
unicode-range: U + 0102-0103, U + 0110-0111, U + 1ea0-1ef9, U + 20ab;
|
51
|
-
}
|
52
|
-
/* latin-ext */
|
53
|
-
@font-face {
|
54
|
-
font-family: 'Regular';
|
55
|
-
font-style: normal;
|
56
|
-
font-weight: 400;
|
57
|
-
src: local('Open Sans Regular'), local('OpenSans-Regular'),
|
58
|
-
url(https://fonts.gstatic.com/s/opensans/v15/mem8YaGs126MiZpBA-UFW50bf8pkAp6a.woff2)
|
59
|
-
format('woff2');
|
60
|
-
unicode-range: U + 0100-024f, U + 0259, U + 1-1eff, U + 2020, U + 20a0-20ab,
|
61
|
-
U + 20ad-20cf, U + 2113, U + 2c60-2c7f, U + A720-A7FF;
|
62
|
-
}
|
63
|
-
/* latin */
|
64
|
-
@font-face {
|
65
|
-
font-family: 'Regular';
|
66
|
-
font-style: normal;
|
67
|
-
font-weight: 400;
|
68
|
-
src: local('Open Sans Regular'), local('OpenSans-Regular'),
|
69
|
-
url(https://fonts.gstatic.com/s/opensans/v15/mem8YaGs126MiZpBA-UFVZ0bf8pkAg.woff2)
|
70
|
-
format('woff2');
|
71
|
-
unicode-range: U + 0000-00ff, U + 0131, U + 0152-0153, U + 02bb-02bc, U + 02c6,
|
72
|
-
U + 02da, U + 02dc, U + 2000-206f, U + 2074, U + 20ac, U + 2122, U + 2191,
|
73
|
-
U + 2193, U + 2212, U + 2215, U + FEFF, U + FFFD;
|
74
|
-
}
|
75
|
-
/* cyrillic-ext */
|
76
|
-
@font-face {
|
77
|
-
font-family: 'Semibold';
|
78
|
-
font-style: normal;
|
79
|
-
font-weight: 700;
|
80
|
-
src: local('Open Sans Bold'), local('OpenSans-Bold'),
|
81
|
-
url(https://fonts.gstatic.com/s/opensans/v15/mem5YaGs126MiZpBA-UN7rgOX-hpKKSTj5PW.woff2)
|
82
|
-
format('woff2');
|
83
|
-
unicode-range: U + 0460-052f, U + 1c80-1c88, U + 20b4, U + 2de0-2dff,
|
84
|
-
U + A640-A69F, U + FE2E-FE2F;
|
85
|
-
}
|
86
|
-
/* cyrillic */
|
87
|
-
@font-face {
|
88
|
-
font-family: 'Semibold';
|
89
|
-
font-style: normal;
|
90
|
-
font-weight: 700;
|
91
|
-
src: local('Open Sans Bold'), local('OpenSans-Bold'),
|
92
|
-
url(https://fonts.gstatic.com/s/opensans/v15/mem5YaGs126MiZpBA-UN7rgOVuhpKKSTj5PW.woff2)
|
93
|
-
format('woff2');
|
94
|
-
unicode-range: U + 0400-045f, U + 0490-0491, U + 04b0-04b1, U + 2116;
|
95
|
-
}
|
96
|
-
/* greek-ext */
|
97
|
-
@font-face {
|
98
|
-
font-family: 'Semibold';
|
99
|
-
font-style: normal;
|
100
|
-
font-weight: 700;
|
101
|
-
src: local('Open Sans Bold'), local('OpenSans-Bold'),
|
102
|
-
url(https://fonts.gstatic.com/s/opensans/v15/mem5YaGs126MiZpBA-UN7rgOXuhpKKSTj5PW.woff2)
|
103
|
-
format('woff2');
|
104
|
-
unicode-range: U + 1f00-1fff;
|
105
|
-
}
|
106
|
-
/* greek */
|
107
|
-
@font-face {
|
108
|
-
font-family: 'Semibold';
|
109
|
-
font-style: normal;
|
110
|
-
font-weight: 700;
|
111
|
-
src: local('Open Sans Bold'), local('OpenSans-Bold'),
|
112
|
-
url(https://fonts.gstatic.com/s/opensans/v15/mem5YaGs126MiZpBA-UN7rgOUehpKKSTj5PW.woff2)
|
113
|
-
format('woff2');
|
114
|
-
unicode-range: U + 0370-03ff;
|
115
|
-
}
|
116
|
-
/* vietnamese */
|
117
|
-
@font-face {
|
118
|
-
font-family: 'Semibold';
|
119
|
-
font-style: normal;
|
120
|
-
font-weight: 700;
|
121
|
-
src: local('Open Sans Bold'), local('OpenSans-Bold'),
|
122
|
-
url(https://fonts.gstatic.com/s/opensans/v15/mem5YaGs126MiZpBA-UN7rgOXehpKKSTj5PW.woff2)
|
123
|
-
format('woff2');
|
124
|
-
unicode-range: U + 0102-0103, U + 0110-0111, U + 1ea0-1ef9, U + 20ab;
|
125
|
-
}
|
126
|
-
/* latin-ext */
|
127
|
-
@font-face {
|
128
|
-
font-family: 'Semibold';
|
129
|
-
font-style: normal;
|
130
|
-
font-weight: 700;
|
131
|
-
src: local('Open Sans Bold'), local('OpenSans-Bold'),
|
132
|
-
url(https://fonts.gstatic.com/s/opensans/v15/mem5YaGs126MiZpBA-UN7rgOXOhpKKSTj5PW.woff2)
|
133
|
-
format('woff2');
|
134
|
-
unicode-range: U + 0100-024f, U + 0259, U + 1-1eff, U + 2020, U + 20a0-20ab,
|
135
|
-
U + 20ad-20cf, U + 2113, U + 2c60-2c7f, U + A720-A7FF;
|
136
|
-
}
|
137
|
-
/* latin */
|
138
|
-
@font-face {
|
139
|
-
font-family: 'Semibold';
|
140
|
-
font-style: normal;
|
141
|
-
font-weight: 700;
|
142
|
-
src: local('Open Sans Bold'), local('OpenSans-Bold'),
|
143
|
-
url(https://fonts.gstatic.com/s/opensans/v15/mem5YaGs126MiZpBA-UN7rgOUuhpKKSTjw.woff2)
|
144
|
-
format('woff2');
|
145
|
-
unicode-range: U + 0000-00ff, U + 0131, U + 0152-0153, U + 02bb-02bc, U + 02c6,
|
146
|
-
U + 02da, U + 02dc, U + 2000-206f, U + 2074, U + 20ac, U + 2122, U + 2191,
|
147
|
-
U + 2193, U + 2212, U + 2215, U + FEFF, U + FFFD;
|
148
|
-
}
|
149
2
|
|
150
3
|
*,
|
151
4
|
:after,
|
@@ -262,7 +115,7 @@ body {
|
|
262
115
|
background: #fff;
|
263
116
|
font-size: 14px;
|
264
117
|
overflow: hidden;
|
265
|
-
font-family:
|
118
|
+
font-family: "Poppins", sans-serif;
|
266
119
|
}
|
267
120
|
|
268
121
|
main {
|
@@ -332,7 +185,7 @@ main {
|
|
332
185
|
width: 100%;
|
333
186
|
height: 100%;
|
334
187
|
}
|
335
|
-
.versionPart {
|
188
|
+
/* .versionPart {
|
336
189
|
padding: 4px 4px 7px;
|
337
190
|
text-align: center;
|
338
191
|
background: #0c1115;
|
@@ -355,8 +208,8 @@ main {
|
|
355
208
|
}
|
356
209
|
.tools:hover {
|
357
210
|
background-color: #07ab67;
|
358
|
-
}
|
359
|
-
.sliderContainer {
|
211
|
+
} */
|
212
|
+
/* .sliderContainer {
|
360
213
|
position: relative;
|
361
214
|
}
|
362
215
|
.slider {
|
@@ -427,7 +280,7 @@ main {
|
|
427
280
|
width: 0px !important;
|
428
281
|
font-size: 0px !important;
|
429
282
|
padding: 0px !important;
|
430
|
-
}
|
283
|
+
} */
|
431
284
|
.mainMenu {
|
432
285
|
padding: 10px;
|
433
286
|
cursor: pointer;
|
@@ -551,9 +404,9 @@ main {
|
|
551
404
|
}
|
552
405
|
|
553
406
|
section {
|
554
|
-
border:
|
407
|
+
border: 8px solid #333;
|
555
408
|
position: relative;
|
556
|
-
border-radius:
|
409
|
+
/* border-radius: 5px 5px 0 0; */
|
557
410
|
transition:width 0.2ms;
|
558
411
|
}
|
559
412
|
.iframe {
|
@@ -584,12 +437,17 @@ section {
|
|
584
437
|
}
|
585
438
|
.ccontent {
|
586
439
|
background-color: #fff;
|
587
|
-
padding: 5px 20px 0px 20px;
|
588
440
|
overflow: auto;
|
441
|
+
/* padding: 0 24px; */
|
442
|
+
/* width: 100%; */
|
443
|
+
}
|
444
|
+
.ccontent .propsTableContainer{
|
445
|
+
padding: 0 24px;
|
589
446
|
}
|
590
447
|
|
591
448
|
.cheadertitle {
|
592
|
-
font-family: Semibold;
|
449
|
+
/* font-family: Semibold; */
|
450
|
+
font-weight: 700;
|
593
451
|
font-size: 21px;
|
594
452
|
margin-right: 30px;
|
595
453
|
color: #0c1015;
|
@@ -632,22 +490,26 @@ section {
|
|
632
490
|
fill: #fff;
|
633
491
|
}
|
634
492
|
.propsTable {
|
635
|
-
margin:
|
636
|
-
border: 1px solid #ebedf0;
|
493
|
+
margin: 10px auto;
|
637
494
|
font-size: 14px;
|
495
|
+
/* border-radius: 10px; */
|
638
496
|
line-height: 1.5;
|
639
497
|
empty-cells: show;
|
640
498
|
}
|
641
499
|
.tableHeader {
|
500
|
+
border-left: 1px solid #e0e8ef;
|
501
|
+
border-right: 1px solid #e0e8ef;
|
502
|
+
border-bottom: 1px solid #e0e8ef;
|
642
503
|
display: flex;
|
643
504
|
flex-direction: row;
|
644
505
|
}
|
645
506
|
.brR {
|
646
507
|
white-space: nowrap;
|
647
|
-
color: #
|
648
|
-
font-
|
649
|
-
|
650
|
-
|
508
|
+
color: #000;
|
509
|
+
font-size: 16px;
|
510
|
+
font-weight: 600;
|
511
|
+
background: #f6f8fb;
|
512
|
+
padding: 14px 24px !important;
|
651
513
|
text-align: left;
|
652
514
|
}
|
653
515
|
.tableHeaderNB {
|
@@ -662,10 +524,9 @@ section {
|
|
662
524
|
text-overflow: ellipsis;
|
663
525
|
word-wrap: normal;
|
664
526
|
word-break: break-word;
|
665
|
-
|
666
|
-
padding: 16px 24px;
|
527
|
+
padding: 12px 24px;
|
667
528
|
text-align: left;
|
668
|
-
|
529
|
+
letter-spacing: 0.2px;
|
669
530
|
}
|
670
531
|
.tableHeaderNB span {
|
671
532
|
border-bottom-width: 0;
|
@@ -750,7 +611,7 @@ section {
|
|
750
611
|
line-height: 30px;
|
751
612
|
cursor: pointer;
|
752
613
|
margin-right: 10px;
|
753
|
-
border-radius:
|
614
|
+
border-radius: 15px;
|
754
615
|
transition: all 0.1s;
|
755
616
|
}
|
756
617
|
.infoactive,
|
@@ -919,15 +780,14 @@ section {
|
|
919
780
|
}
|
920
781
|
.toolOptions{
|
921
782
|
background: #333;
|
922
|
-
border-radius:
|
923
|
-
margin: 5px 0;
|
783
|
+
border-radius: 0;
|
924
784
|
}
|
925
785
|
.toolarea{
|
926
786
|
overflow: auto;
|
927
787
|
}
|
928
788
|
.range{
|
929
789
|
width: 500px;
|
930
|
-
padding:
|
790
|
+
padding: 5px 0;
|
931
791
|
position: relative;
|
932
792
|
margin-left: 20px;
|
933
793
|
flex: .5;
|
@@ -1020,3 +880,110 @@ section {
|
|
1020
880
|
bottom: 0;
|
1021
881
|
background:#fff;
|
1022
882
|
}
|
883
|
+
|
884
|
+
.compName {
|
885
|
+
font-size: 20px;
|
886
|
+
font-weight: 600;
|
887
|
+
position: -webkit-sticky;
|
888
|
+
position: sticky;
|
889
|
+
top: 0px;
|
890
|
+
background-color: #fff;
|
891
|
+
padding: 5px 10px 5px 20px;
|
892
|
+
border-radius: 5px;
|
893
|
+
box-shadow: 0 0 5px #d5dde7 inset;
|
894
|
+
border: 1px solid #d5dde7;
|
895
|
+
margin-top: 10px
|
896
|
+
}
|
897
|
+
|
898
|
+
.tableHeader:last-child {
|
899
|
+
/* border-bottom: none; */
|
900
|
+
}
|
901
|
+
|
902
|
+
.tableHeader:first-child {
|
903
|
+
position: -webkit-sticky;
|
904
|
+
position: sticky;
|
905
|
+
border-top: 1px solid #e0e8ef;
|
906
|
+
top: 41px;
|
907
|
+
}
|
908
|
+
|
909
|
+
/* .brR:first-child {
|
910
|
+
border-top-left-radius: 10px;
|
911
|
+
}
|
912
|
+
|
913
|
+
.brR:last-child {
|
914
|
+
border-top-right-radius: 10px;
|
915
|
+
} */
|
916
|
+
.typeTag {
|
917
|
+
display: inline-block;
|
918
|
+
border-radius: 4px;
|
919
|
+
padding: 0 4px
|
920
|
+
}
|
921
|
+
.stringType{
|
922
|
+
color: #0a73eb;
|
923
|
+
background-color: rgba(10, 115, 235, 0.1);
|
924
|
+
border: 1px solid #0a73eb
|
925
|
+
}
|
926
|
+
.boolType{
|
927
|
+
color: #e47016;
|
928
|
+
background-color: rgba(228, 112, 22, 0.1);
|
929
|
+
border: 1px solid #e47016;
|
930
|
+
}
|
931
|
+
.funcType{
|
932
|
+
color: #da2323;
|
933
|
+
background-color: rgba(218, 35, 35, 0.1);
|
934
|
+
border: 1px solid #da2323
|
935
|
+
}
|
936
|
+
.oneOfType, .oneOfTypeType{
|
937
|
+
color: #b36000;
|
938
|
+
background-color: #fff2e1;
|
939
|
+
border: 1px solid #ffa606
|
940
|
+
}
|
941
|
+
|
942
|
+
.objectType{
|
943
|
+
color: #0ba53d;
|
944
|
+
background-color: rgba(11, 165, 61, 0.1);
|
945
|
+
border: 1px solid #0ba53d;
|
946
|
+
}
|
947
|
+
|
948
|
+
.elementType{
|
949
|
+
color: #06b7ce;
|
950
|
+
background-color: rgba(35, 209, 218, 0.1);
|
951
|
+
border: 1px solid #23d1da
|
952
|
+
}
|
953
|
+
|
954
|
+
.arrayType{
|
955
|
+
color: #ce0656;
|
956
|
+
background-color: rgba(218, 35, 172, 0.1);
|
957
|
+
border: 1px solid #da237f
|
958
|
+
}
|
959
|
+
|
960
|
+
.shapeType{
|
961
|
+
color: #8705eb;
|
962
|
+
background-color: rgba(166, 35, 218, 0.1);
|
963
|
+
border: 1px solid #b523da
|
964
|
+
}
|
965
|
+
|
966
|
+
.numberType{
|
967
|
+
color: #6306ce;
|
968
|
+
background-color: rgba(124, 35, 218, 0.1);
|
969
|
+
border: 1px solid #7c23da
|
970
|
+
}
|
971
|
+
|
972
|
+
.isRequired{
|
973
|
+
color: #d46262;
|
974
|
+
}
|
975
|
+
|
976
|
+
.isNotRequired{
|
977
|
+
color: #0ba53d;
|
978
|
+
}
|
979
|
+
|
980
|
+
|
981
|
+
.CodeTag,
|
982
|
+
.CodeTag * {
|
983
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace;
|
984
|
+
line-height: 1.6;
|
985
|
+
letter-spacing: 0.1px;
|
986
|
+
font-size: 14px;
|
987
|
+
word-wrap: break-word;
|
988
|
+
white-space: pre-wrap;
|
989
|
+
}
|