neo-cmp-cli 1.5.1 → 1.5.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.
Files changed (68) hide show
  1. package/README.md +52 -15
  2. package/package.json +1 -1
  3. package/src/cmpUtils/createCmpByTemplate.js +52 -0
  4. package/src/cmpUtils/createCommonModulesCode.js +15 -15
  5. package/src/cmpUtils/{getCmpModelRegister.js → getCmpModelRegisterCode.js} +2 -2
  6. package/src/cmpUtils/{getCmpPreview.js → getCmpPreviewCode.js} +2 -2
  7. package/src/cmpUtils/{getCmpRegister.js → getCmpRegisterCode.js} +2 -2
  8. package/src/cmpUtils/getCmpTypeByDir.js +41 -0
  9. package/src/cmpUtils/hasCmpTypeByDir.js +11 -0
  10. package/src/{module → cmpUtils}/previewCmp.js +2 -2
  11. package/src/cmpUtils/{publishCmp.js → pushCmp.js} +54 -42
  12. package/src/config/default.config.js +14 -2
  13. package/src/module/index.js +144 -21
  14. package/src/module/main.js +17 -13
  15. package/src/module/neoInit.js +3 -0
  16. package/src/module/neoInitByCopy.js +3 -0
  17. package/src/neo/NeoUMDContent.js +29 -0
  18. package/src/neo/neoRequire.js +7 -7
  19. package/src/neo/neoService.js +174 -72
  20. package/src/neo/wrapperContent.js +2 -1
  21. package/src/oss/publish2oss.js +1 -1
  22. package/src/plugins/AddNeoRequirePlugin.js +5 -2
  23. package/src/projectUtils/createCmpProjectByTemplate.js +49 -0
  24. package/src/{cmpUtils → projectUtils}/getEntriesWithAutoRegister.js +4 -4
  25. package/src/template/antd-custom-cmp-template/README.md +2 -2
  26. package/src/template/antd-custom-cmp-template/neo.config.js +22 -14
  27. package/src/template/antd-custom-cmp-template/package.json +3 -3
  28. package/src/template/develop/neo-custom-cmp-template/neo.config.js +1 -1
  29. package/src/template/echarts-custom-cmp-template/README.md +2 -2
  30. package/src/template/echarts-custom-cmp-template/neo.config.js +19 -13
  31. package/src/template/echarts-custom-cmp-template/package.json +3 -3
  32. package/src/template/empty-cmp/index.tsx +51 -0
  33. package/src/template/empty-cmp/model.ts +77 -0
  34. package/src/template/empty-cmp/style.scss +72 -0
  35. package/src/template/empty-custom-cmp-template/.prettierrc.js +12 -0
  36. package/src/template/empty-custom-cmp-template/README.md +45 -0
  37. package/src/template/empty-custom-cmp-template/commitlint.config.js +59 -0
  38. package/src/template/empty-custom-cmp-template/neo.config.js +126 -0
  39. package/src/template/empty-custom-cmp-template/package.json +57 -0
  40. package/src/template/empty-custom-cmp-template/public/css/base.css +283 -0
  41. package/src/template/empty-custom-cmp-template/public/scripts/app/bluebird.js +6679 -0
  42. package/src/template/empty-custom-cmp-template/public/template.html +13 -0
  43. package/src/template/empty-custom-cmp-template/src/assets/css/common.scss +127 -0
  44. package/src/template/empty-custom-cmp-template/src/assets/css/mixin.scss +47 -0
  45. package/src/template/empty-custom-cmp-template/src/assets/img/NeoCRM.jpg +0 -0
  46. package/src/template/empty-custom-cmp-template/src/assets/img/custom-widget.svg +1 -0
  47. package/src/template/empty-custom-cmp-template/src/assets/img/favicon.png +0 -0
  48. package/src/template/empty-custom-cmp-template/src/assets/img/map.svg +1 -0
  49. package/src/template/empty-custom-cmp-template/src/components/README.md +3 -0
  50. package/src/template/empty-custom-cmp-template/tsconfig.json +68 -0
  51. package/src/template/neo-custom-cmp-template/README.md +2 -2
  52. package/src/template/neo-custom-cmp-template/neo.config.js +6 -26
  53. package/src/template/neo-custom-cmp-template/package.json +3 -4
  54. package/src/template/react-custom-cmp-template/README.md +2 -2
  55. package/src/template/react-custom-cmp-template/neo.config.js +20 -15
  56. package/src/template/react-custom-cmp-template/package.json +3 -3
  57. package/src/template/react-ts-custom-cmp-template/README.md +2 -2
  58. package/src/template/react-ts-custom-cmp-template/neo.config.js +19 -14
  59. package/src/template/react-ts-custom-cmp-template/package.json +3 -3
  60. package/src/template/vue2-custom-cmp-template/README.md +2 -2
  61. package/src/template/vue2-custom-cmp-template/neo.config.js +20 -15
  62. package/src/template/vue2-custom-cmp-template/package.json +3 -3
  63. package/src/utils/autoEntryRootDir.js +75 -0
  64. package/src/utils/replaceInFilesByMap.js +54 -0
  65. package/test/demo.js +2 -2
  66. package/src/template/neo-custom-cmp-template/auth.config.js +0 -12
  67. /package/src/{cmpUtils → projectUtils}/getEntries.js +0 -0
  68. /package/src/{cmpUtils → projectUtils}/updatePublishLog.js +0 -0
@@ -0,0 +1,283 @@
1
+ @charset "utf-8";
2
+
3
+ body {
4
+ margin: 0;
5
+ border-width: 0;
6
+ padding: 0;
7
+ font-family: PingFangSC-Regular;
8
+ }
9
+
10
+ div,
11
+ dl,
12
+ dt,
13
+ dd,
14
+ ul,
15
+ ol,
16
+ li,
17
+ h1,
18
+ h2,
19
+ h3,
20
+ h4,
21
+ h5,
22
+ h6,
23
+ pre,
24
+ code,
25
+ form,
26
+ fieldset,
27
+ legend,
28
+ input,
29
+ textarea,
30
+ p,
31
+ blockquote,
32
+ th,
33
+ td,
34
+ hr,
35
+ i,
36
+ button,
37
+ article,
38
+ aside,
39
+ details,
40
+ figcaption,
41
+ figure,
42
+ footer,
43
+ header,
44
+ hgroup,
45
+ menu,
46
+ nav,
47
+ section {
48
+ margin: 0;
49
+ padding: 0;
50
+ border-width: 0;
51
+ font-family: PingFangSC-Regular;
52
+ box-sizing: padding-box;
53
+ -webkit-box-sizing: padding-box;
54
+ -moz-box-sizing: padding-box;
55
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
56
+ }
57
+
58
+ body,
59
+ button,
60
+ input,
61
+ select,
62
+ textarea {
63
+ font-size: 14px;
64
+ line-height: 1.125;
65
+ }
66
+
67
+ [v-cloak] {
68
+ display: none;
69
+ }
70
+
71
+ li,
72
+ ul,
73
+ ol {
74
+ list-style: none;
75
+ }
76
+
77
+ a {
78
+ text-decoration: none;
79
+ }
80
+
81
+ a:active {
82
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
83
+ }
84
+
85
+ sub,
86
+ sup {
87
+ line-height: 0;
88
+ }
89
+
90
+ table {
91
+ border-collapse: collapse;
92
+ border-spacing: 0;
93
+ }
94
+
95
+ li {
96
+ list-style: none;
97
+ }
98
+
99
+ fieldset,
100
+ img {
101
+ border: 0;
102
+ }
103
+
104
+ input,
105
+ textarea {
106
+ outline-style: none;
107
+ }
108
+
109
+ input[type='text'],
110
+ input[type='search'],
111
+ input[type='password'] {
112
+ -webkit-border-radius: 0;
113
+ -moz-border-radius: 0;
114
+ -o-border-radius: 0;
115
+ border-radius: 0;
116
+ }
117
+
118
+ textarea {
119
+ resize: none;
120
+ }
121
+
122
+ address,
123
+ caption,
124
+ cite,
125
+ code,
126
+ dfn,
127
+ em,
128
+ i,
129
+ th,
130
+ var {
131
+ font-style: normal;
132
+ font-weight: normal;
133
+ }
134
+
135
+ legend {
136
+ color: #000;
137
+ }
138
+
139
+ abbr,
140
+ acronym {
141
+ border: 0;
142
+ font-variant: normal;
143
+ }
144
+
145
+ a {
146
+ text-decoration: none;
147
+ outline: none;
148
+ }
149
+
150
+ a:hover {
151
+ text-decoration: none;
152
+ }
153
+
154
+ .clearit {
155
+ clear: both;
156
+ height: 0;
157
+ font-size: 0;
158
+ overflow: hidden;
159
+ }
160
+
161
+ /* surface下viewport不生效的解决办法 */
162
+ @media screen and (min-width: 767px) and (device-aspect-ratio: 16/9) {
163
+ @-ms-viewport {
164
+ zoom: 1;
165
+ max-zoom: 1;
166
+ min-zoom: 1;
167
+ }
168
+ }
169
+
170
+ /* surface下IE10 点击链接,背景变色 */
171
+ @media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
172
+ a {
173
+ background-color: transparent;
174
+ }
175
+ }
176
+
177
+ img {
178
+ -ms-interpolation-mode: bicubic;
179
+ image-rendering: optimizeQuality;
180
+ }
181
+
182
+ /* portrait:指定输出设备中的页面可见区域高度大于或等于宽度, landscape:横屏*/
183
+ @media not screen and (orientation: landscape),
184
+ not screen and (orientation: portrait) {
185
+ body,
186
+ button,
187
+ input,
188
+ select,
189
+ textarea {
190
+ font-family: 'Microsoft Yahei', 'Simsun';
191
+ }
192
+ }
193
+
194
+ ::-moz-placeholder {
195
+ color: #767676;
196
+ }
197
+
198
+ ::-webkit-input-placeholder {
199
+ color: #767676;
200
+ }
201
+
202
+ :-ms-input-placeholder {
203
+ color: #767676;
204
+ }
205
+
206
+ .cont-selected {
207
+ display: block !important;
208
+ }
209
+
210
+ .hidden {
211
+ visibility: hidden;
212
+ }
213
+
214
+ .ellipsis {
215
+ overflow: hidden;
216
+ white-space: nowrap;
217
+ text-overflow: ellipsis;
218
+ }
219
+
220
+ .clearfix:after {
221
+ content: '.';
222
+ display: block;
223
+ height: 0;
224
+ visibility: hidden;
225
+ clear: both;
226
+ }
227
+
228
+ .left {
229
+ float: left;
230
+ }
231
+
232
+ .right {
233
+ float: right;
234
+ }
235
+
236
+ .center {
237
+ margin: 0 auto;
238
+ }
239
+
240
+ .text-center {
241
+ text-align: center;
242
+ }
243
+
244
+ .text-right {
245
+ text-align: right;
246
+ }
247
+
248
+ .text-left {
249
+ text-align: left;
250
+ }
251
+
252
+ .no-border {
253
+ border: none !important;
254
+ }
255
+
256
+ .click-event {
257
+ cursor: pointer;
258
+ }
259
+
260
+ /* 增加iphoneX适配 */
261
+ @media only screen and (device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3) {
262
+ .ipx-fixed-bottom {
263
+ bottom: 34px !important;
264
+ }
265
+
266
+ .ipx-fixed-top {
267
+ top: 20px !important;
268
+ }
269
+
270
+ .ipx-margin-top {
271
+ margin-top: 20px !important;
272
+ }
273
+
274
+ .ipx-margin-bottom {
275
+ margin-bottom: 20px !important;
276
+ }
277
+
278
+ .ipx-height {
279
+ height: 34px !important;
280
+ }
281
+ }
282
+
283
+ /* 业务级公用代码 */