@zohodesk/react-cli 1.1.14-kubernetes → 1.1.15
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/.vscode/settings.json +25 -0
- package/README.md +294 -16
- package/bin/cli.js +30 -55
- package/docs/ComposeMinification.md +13 -0
- package/docs/CustomChunks.md +12 -9
- package/docs/MarkdownParser.md +18 -0
- package/docs/ReactLive.md +14 -0
- package/docs/SelectorWeight.md +3 -0
- package/docs/ValueReplacer.md +27 -0
- package/docs/VariableConversion.md +6 -1
- package/docs/patternFiltering.md +57 -0
- package/lib/common/buildEs.js +12 -0
- package/lib/common/runPreProcess.js +71 -0
- package/lib/common/splitChunks.js +65 -45
- package/lib/common/testPattern.js +9 -11
- package/lib/common/valueReplacer.js +1 -3
- package/lib/configs/resolvers.js +16 -5
- package/lib/configs/webpack.css.umd.config.js +3 -2
- package/lib/configs/webpack.dev.config.js +15 -5
- package/lib/configs/webpack.docs.config.js +17 -5
- package/lib/configs/webpack.impact.config.js +11 -4
- package/lib/configs/webpack.prod.config.js +15 -5
- package/lib/constants.js +3 -3
- package/lib/deprecationLogger.js +40 -0
- package/lib/loaderUtils/getCSSLoaders.js +98 -49
- package/lib/loaderUtils/tests/windowsModification.test.js +10 -0
- package/lib/loaderUtils/windowsModification.js +6 -1
- package/lib/loaders/__test__/markdownLoader.spec.js +145 -0
- package/lib/loaders/composeLoader.js +298 -0
- package/lib/loaders/docsLoader.js +18 -7
- package/lib/loaders/markdownLoader.js +71 -0
- package/lib/loaders/reactLiveConvertor.js +105 -0
- package/lib/loaders/selectorMappingLoader.js +9 -9
- package/lib/logger.js +27 -0
- package/lib/pluginUtils/getDevPlugins.js +25 -6
- package/lib/pluginUtils/getProdPlugins.js +32 -5
- package/lib/pluginUtils/getUMDCSSPlugins.js +1 -1
- package/lib/pluginUtils/getUMDComponentPlugins.js +1 -1
- package/lib/plugins/CustomAttributePlugin.js +82 -0
- package/lib/plugins/CustomAttributePlugin.md +35 -0
- package/lib/plugins/EFCPlugin.js +9 -9
- package/lib/plugins/EFCTemplatePlugin.js +10 -12
- package/lib/plugins/EfcResourceCleanupPlugin.js +43 -0
- package/lib/plugins/I18NInjectIntoIndexPlugin.js +8 -9
- package/lib/plugins/I18nSplitPlugin/I18nDebugPlugin.js +2 -3
- package/lib/plugins/I18nSplitPlugin/I18nKeysIdentifer.js +2 -7
- package/lib/plugins/I18nSplitPlugin/index.js +1 -1
- package/lib/plugins/I18nSplitPlugin/utils/propertiesUtils.js +8 -8
- package/lib/plugins/{UglifyCSSPlugin.js → MinifyPlugin.js} +3 -3
- package/lib/plugins/ReportGeneratePlugin.js +8 -6
- package/lib/plugins/ResourceHintsPlugin.js +13 -3
- package/lib/plugins/SelectorPlugin.js +77 -37
- package/lib/plugins/StatsPlugin.js +82 -0
- package/lib/plugins/UnusedFilesFindPlugin.js +7 -5
- package/lib/plugins/VariableConversionCollector.js +40 -101
- package/lib/plugins/index.js +7 -7
- package/lib/plugins/utils/classHandling.js +35 -0
- package/lib/plugins/utils/fileHandling.js +92 -0
- package/lib/plugins/utils/tests/fileHandling.test.js +30 -0
- package/lib/plugins/variableConvertorUtils.js +133 -0
- package/lib/postcss-plugins/EmptyPlugin.js +8 -0
- package/lib/postcss-plugins/ExcludePlugin.js +1 -1
- package/lib/postcss-plugins/IncludePlugin.js +23 -0
- package/lib/postcss-plugins/RTLSplitPlugin.js +4 -10
- package/lib/postcss-plugins/SelectorReplace.js +80 -0
- package/lib/postcss-plugins/ValueReplacer.js +8 -29
- package/lib/postcss-plugins/__test__/selectorReplace.test.js +28 -0
- package/lib/postcss-plugins/__test__/valueReplacer.spec.js +43 -0
- package/lib/postcss-plugins/hoverActivePlugin.js +0 -6
- package/lib/postcss-plugins/variableModificationPlugin/ErrorHandler.js +0 -1
- package/lib/postcss-plugins/variableModificationPlugin/index.js +94 -38
- package/lib/schemas/index.js +95 -18
- package/lib/servers/devBuild.js +13 -11
- package/lib/servers/getCliPath.js +3 -5
- package/lib/servers/httpsOptions.js +12 -13
- package/lib/servers/nowatchserver.js +62 -55
- package/lib/servers/requireLocalOrGlobal.js +61 -0
- package/lib/servers/server.js +53 -52
- package/lib/utils/cssClassNameGenerate.js +70 -13
- package/lib/utils/deprecationSupport.js +134 -0
- package/lib/utils/getOptions.js +35 -28
- package/lib/utils/getServerURL.js +1 -9
- package/lib/utils/index.js +14 -12
- package/lib/utils/initPreCommitHook.js +5 -5
- package/lib/utils/log.js +11 -0
- package/lib/utils/object-manipulation.js +88 -0
- package/lib/utils/pullOrigin.js +3 -3
- package/lib/utils/reinstallDependencies.js +3 -3
- package/lib/utils/selectorReplacer.js +47 -0
- package/lib/utils/switchBranch.js +4 -2
- package/lib/utils/variableConverter.js +104 -0
- package/npm-shrinkwrap.json +33485 -0
- package/package.json +5 -3
- package/templates/docs/all.html +1 -0
- package/templates/docs/component.html +1 -0
- package/templates/docs/components.html +1 -0
- package/templates/docs/css/markdown.css +202 -0
- package/templates/docs/css/style.css +136 -169
- package/templates/docs/index.html +796 -632
- package/lib/plugins/composeCommonPlugin.js +0 -30
- package/lib/postcss-plugins/variableModifier.js +0 -244
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"cSpell.words": [
|
|
3
|
+
"classname",
|
|
4
|
+
"cmjs",
|
|
5
|
+
"devbuild",
|
|
6
|
+
"escodegen",
|
|
7
|
+
"expublish",
|
|
8
|
+
"gitclone",
|
|
9
|
+
"hgclone",
|
|
10
|
+
"mockapi",
|
|
11
|
+
"mockserver",
|
|
12
|
+
"nowatchserver",
|
|
13
|
+
"nowatchstart",
|
|
14
|
+
"postpublish",
|
|
15
|
+
"propertytojson",
|
|
16
|
+
"sslcert",
|
|
17
|
+
"sslcertupdate",
|
|
18
|
+
"sstest",
|
|
19
|
+
"uglifycss",
|
|
20
|
+
"valuereplacer",
|
|
21
|
+
"xmlhttprequest",
|
|
22
|
+
"zohodesk",
|
|
23
|
+
"zsecurity"
|
|
24
|
+
]
|
|
25
|
+
}
|
package/README.md
CHANGED
|
@@ -44,24 +44,287 @@ Now to run app
|
|
|
44
44
|
|
|
45
45
|
# Change Logs
|
|
46
46
|
|
|
47
|
+
# 1.1.15 (11-10-2023)
|
|
48
|
+
|
|
49
|
+
**Feature:-**
|
|
50
|
+
|
|
51
|
+
- externals was added to Prevent bundling of certain imported packages and retrieve these external dependencies at runtime.
|
|
52
|
+
- to use externals, we use the following pattern in `app > externals` :
|
|
53
|
+
|
|
54
|
+
For example
|
|
55
|
+
```
|
|
56
|
+
externals: {
|
|
57
|
+
<key> : <value>
|
|
58
|
+
}
|
|
59
|
+
```
|
|
60
|
+
# 1.1.14 (11-9-2023)
|
|
61
|
+
|
|
62
|
+
**Feature:-**
|
|
63
|
+
|
|
64
|
+
- Value Replacer supports `^` before and `$` after the word to consider the whole word for replacement. Only if the exact word comes as value, there will be a replacement made.
|
|
65
|
+
|
|
66
|
+
**Issue Fix**
|
|
67
|
+
|
|
68
|
+
- 'space' character on variable conversion changes to undefined fixed.
|
|
69
|
+
- calc(100%) variable conversion to undefined fixed.
|
|
70
|
+
- height value if text converts to undefined, issue fixed.
|
|
71
|
+
|
|
72
|
+
# 1.1.13 (4-9-2023)
|
|
73
|
+
|
|
74
|
+
**Changes**
|
|
75
|
+
|
|
76
|
+
- Fixed the issue related to the resource cleanup plugin. (EfcResouceCleanupPlugin)
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
# 1.1.12 (1-9-2023)
|
|
80
|
+
|
|
81
|
+
**Features**
|
|
82
|
+
|
|
83
|
+
- Generating stats.json file for the build assets only in production mode. To use this feature we need to add `stats > enable` or cli flags `enable_stats`.
|
|
84
|
+
- Added Resource Cleanup plugin to cleanup resource retained by build tool. this plugin is controlled by custom attributes enable flag.
|
|
85
|
+
|
|
86
|
+
**Changes**
|
|
87
|
+
|
|
88
|
+
- Added a new config `stats` to control stats file generation.
|
|
89
|
+
- Using Existing custom attributes flag, we can control resource cleanup plugin.
|
|
90
|
+
|
|
91
|
+
# 1.1.11 (4-8-2023)
|
|
92
|
+
|
|
93
|
+
**Changes**
|
|
94
|
+
|
|
95
|
+
- we have renamed our default config file as `react-cli.config.js` instead of `build.config.js`. But we still support `build.config.js` we will remove it in later major version.
|
|
96
|
+
|
|
97
|
+
- Prop-type, Prop description, Default Props support for docs given.
|
|
98
|
+
- Docs and Docs_Code UI updated.
|
|
99
|
+
|
|
100
|
+
**Features:-**
|
|
101
|
+
|
|
102
|
+
- custom classname prefix for separate packages now supported.
|
|
103
|
+
- to use custom classnames for specific patterns, we use the following pattern in `app > customClassNamePrefix` or `docs > customClassNamePrefix` :
|
|
104
|
+
|
|
105
|
+
```
|
|
106
|
+
"customClassNamePrefix" : [
|
|
107
|
+
{
|
|
108
|
+
"enable": true,
|
|
109
|
+
"prefix": "[required-prefix]",
|
|
110
|
+
"patterns":[
|
|
111
|
+
"**/[path-name]/**/*.css"
|
|
112
|
+
]
|
|
113
|
+
}
|
|
114
|
+
]
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
For example,
|
|
118
|
+
|
|
119
|
+
```
|
|
120
|
+
"customClassNamePrefix": [
|
|
121
|
+
{
|
|
122
|
+
"enable": true,
|
|
123
|
+
"prefix": "zdSvg",
|
|
124
|
+
"patterns": [
|
|
125
|
+
"**/@zohodesk/svg/**/*.css"
|
|
126
|
+
]
|
|
127
|
+
},
|
|
128
|
+
],
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
**Issue Fix:**
|
|
132
|
+
|
|
133
|
+
- typo fix, (../src/common/runPreProcess.js) to (../lib/common/runPreProcess.js) in cli.js our code.
|
|
134
|
+
|
|
135
|
+
# 1.1.10 (2-8-2023)
|
|
136
|
+
|
|
137
|
+
**Issue Fix:**
|
|
138
|
+
|
|
139
|
+
- undefined plugin postcss issue fixed for docs.
|
|
140
|
+
- unnecessary deprecation warning stopped. (for exclude config)
|
|
141
|
+
|
|
142
|
+
# 1.1.9 (25-7-2023)
|
|
143
|
+
|
|
144
|
+
**Features:-**
|
|
145
|
+
|
|
146
|
+
- we have added config file support for react-cli schema. the default config file name `build.config.js` support added. In `build.config.js` you must export configuration object under `config` key. And Note: `build.config.js` is high priority then `package.json` `react-cli` config.
|
|
147
|
+
- added support for using regex expression to get group of chunks chunkId via Resource Hint plugin prefetch/preload hook.
|
|
148
|
+
only will be activate when `resourceHints` => `allowPrefetchingMultipleChunks` as `true`
|
|
149
|
+
- added support for pattern as function for custom chunks split logic.
|
|
150
|
+
- added options to split chunks base config in the key `app` => `customChunksBaseConfig` as object
|
|
151
|
+
- added `postCssPluginOrder` feature :
|
|
152
|
+
|
|
153
|
+
- If `app > postCssPluginOrder` or `docs > postCssPluginOrder` is set to "false", default plugin order will be followed.
|
|
154
|
+
- If `app > postCssPluginOrder` or `docs > postCssPluginOrder` is set to "true", order preserved in `plugins` Object will be considered.
|
|
155
|
+
- If `app > postCssPluginOrder` or `docs > postCssPluginOrder` is set to an array with plugins in a custom order, the custom order will be considered.
|
|
156
|
+
|
|
157
|
+
- We use the same plugin names as in `patterns` for the plugins to execute successfully.
|
|
158
|
+
|
|
159
|
+
**Issue Fix**
|
|
160
|
+
|
|
161
|
+
- fixed file path separator issue with split chunks config for vendor exclude list for windows (that was work well for mac and ubuntu only issue in windows).
|
|
162
|
+
- fixed cssUniqueness pattern not working in docs.
|
|
163
|
+
|
|
164
|
+
**Changes**
|
|
165
|
+
|
|
166
|
+
- previously all custom chunks are enforce true, no we have given support for enforce false for chunks on splitChunks config.
|
|
167
|
+
|
|
168
|
+
# 1.1.8
|
|
169
|
+
|
|
170
|
+
**Issue Fix**
|
|
171
|
+
|
|
172
|
+
- Docs fix for Selector Replace 'always require argument' issue.
|
|
173
|
+
|
|
174
|
+
# 1.1.7
|
|
175
|
+
|
|
176
|
+
**Feature**
|
|
177
|
+
|
|
178
|
+
- Markdown parser feature added in docs
|
|
179
|
+
For more info please refer to :
|
|
180
|
+
[details](https://zgit.csez.zohocorpin.com/zohodesk/react-cli/-/blob/2.0.0/docs/MarkdownParser.md)
|
|
181
|
+
|
|
182
|
+
# 1.1.6-exp.2
|
|
183
|
+
|
|
184
|
+
- fixed file path separator issue with split chunks config for vendor exclude list.
|
|
185
|
+
- added support for not doing enforce true for chunks on splitChunks config.
|
|
186
|
+
|
|
187
|
+
# 1.1.5-exp.5
|
|
188
|
+
|
|
189
|
+
- fixed the issues regarding custom chunks base config schema.
|
|
190
|
+
|
|
191
|
+
# 1.1.5-exp.4
|
|
192
|
+
|
|
193
|
+
- added support for using regex expression to get group of chunks chunkId via Resource Hint plugin prefetch/preload hook.
|
|
194
|
+
|
|
195
|
+
# 1.1.5-exp.3
|
|
196
|
+
|
|
197
|
+
- added options to split chunks base config
|
|
198
|
+
- added support for passing custom chunks split logic as function.
|
|
199
|
+
|
|
200
|
+
# 1.1.6
|
|
201
|
+
|
|
202
|
+
**Issue Fix**
|
|
203
|
+
|
|
204
|
+
- local install react-cli spawnSync Error fix in npm 8
|
|
205
|
+
- babel version update issue fix (Cannot read properties of undefined (reading 'file')) and (BABEL_TRANSFORM_ERROR)
|
|
206
|
+
|
|
207
|
+
# 1.1.5-exp.2
|
|
208
|
+
|
|
209
|
+
**Issue Fix**
|
|
210
|
+
|
|
211
|
+
- local install react-cli spawnSync Error fix in npm 8
|
|
212
|
+
|
|
213
|
+
# 1.1.5
|
|
214
|
+
|
|
215
|
+
**Issue Fix**
|
|
216
|
+
|
|
217
|
+
- include pattern fix for variable converter plugin fixed
|
|
218
|
+
|
|
219
|
+
# 1.1.4
|
|
220
|
+
|
|
221
|
+
**Issue Fix**
|
|
222
|
+
|
|
223
|
+
- global install react-cli spawnSync Error fix
|
|
224
|
+
- `0px` variable value conversion issue fixed
|
|
225
|
+
- pattern exclude for postcss plugins case fixed
|
|
226
|
+
|
|
227
|
+
# 1.1.3
|
|
228
|
+
|
|
229
|
+
**Issue Fix**
|
|
230
|
+
|
|
231
|
+
- local install react-cli spawnSync Error fix
|
|
232
|
+
|
|
233
|
+
# 1.1.2
|
|
234
|
+
|
|
235
|
+
**Issue Fix**
|
|
236
|
+
|
|
237
|
+
- ReactLiveConverter filepath changed to 'reactLiveConverter.js' in docLoader file
|
|
238
|
+
|
|
239
|
+
# 1.1.1
|
|
240
|
+
|
|
241
|
+
**Issue Fix**
|
|
242
|
+
|
|
243
|
+
- docs component name incorrect in windows, when using --enableReactLive issue fixed.
|
|
244
|
+
|
|
245
|
+
**Feature Update**
|
|
246
|
+
|
|
247
|
+
- Support for desk-library to use Selector Replace plugin using individual script. To use `react-cli selectorReplacer [source] [target]`
|
|
248
|
+
|
|
249
|
+
# 1.1.0
|
|
250
|
+
|
|
251
|
+
**Feature Update**
|
|
252
|
+
|
|
253
|
+
- Support for desk-library to use variable conversion plugin using individual script. To use `react-cli variableConverter [source] [target]`
|
|
254
|
+
- pattern filter changes, new filter system instead of exclude to include or exclude files for plugins.
|
|
255
|
+
For more info please refer to :
|
|
256
|
+
[details](https://zgit.csez.zohocorpin.com/zohodesk/react-cli/-/blob/2.0.0/docs/patternFiltering.md)
|
|
257
|
+
- React Live feature implemented for Docs.
|
|
258
|
+
[details](https://zgit.csez.zohocorpin.com/zohodesk/react-cli/-/blob/2.0.0/docs/ReactLive.md)
|
|
259
|
+
|
|
260
|
+
# 1.0.3-beta.1
|
|
261
|
+
|
|
262
|
+
**Issue Fix**
|
|
263
|
+
|
|
264
|
+
- nock api not working issue fixed. This error throwing in @zohodesk/react-cli@1.0.2 version. but working in older versions ( 0.0.1-beta.178 )
|
|
265
|
+
|
|
266
|
+
# 1.0.3
|
|
267
|
+
|
|
268
|
+
**Feature Update**
|
|
269
|
+
|
|
270
|
+
- Support for global httpsCerts usage
|
|
271
|
+
- Support for global client_packages_group usage
|
|
272
|
+
- custom attribute for dynamically loading chunks, In this version we merged changes from [0.0.1-beta.167.1](#0.0.1-beta.167.1).
|
|
273
|
+
**Package Update**
|
|
274
|
+
- @zohodesk/client_packages_group@**1.0.1** ==> @zohodesk/client_packages_group@**1.0.2**
|
|
275
|
+
|
|
276
|
+
# 1.0.2
|
|
277
|
+
|
|
278
|
+
**Feature Update**
|
|
279
|
+
|
|
280
|
+
- Selector replace plugin made as a custom postcss-plugin with update to code that was unpublished in package.
|
|
281
|
+
|
|
282
|
+
# 1.0.1
|
|
283
|
+
|
|
284
|
+
**Issue Fix**
|
|
285
|
+
|
|
286
|
+
- variable conversion for px and var(--) values in same declaration was not supported, now it is supported.
|
|
287
|
+
- package-lock.json removed from `.npmignore`
|
|
288
|
+
|
|
289
|
+
**Feature Update**
|
|
290
|
+
|
|
291
|
+
- exclude added to Selector Plugin
|
|
292
|
+
|
|
293
|
+
# 1.0.0
|
|
294
|
+
|
|
295
|
+
## Major Release
|
|
296
|
+
|
|
297
|
+
**Changes:**
|
|
298
|
+
|
|
299
|
+
- File support added for `.webp` for `docs`, `dev` and `prod` mode
|
|
300
|
+
- File support added for `.webm` for `docs`, `dev` and `prod` mode
|
|
301
|
+
|
|
302
|
+
**Breaking Changes:**
|
|
303
|
+
|
|
304
|
+
- We have remove ssl certificate for security reasons.
|
|
305
|
+
So default https server won't run.
|
|
306
|
+
In order to make it work as before you need to specify two things
|
|
307
|
+
1. install `@zohodesk-private/client_dev_cert`
|
|
308
|
+
2. `react-cli.app.server.httpsCerts` option example `"httpsCerts": "@zohodesk-private/client_dev_cert"`
|
|
309
|
+
unless configaration are proper this may break `start` , `docs` , `nowatchstart`. and mock wms `/wmsmockapi` won't work.
|
|
310
|
+
So Please be carefull when you update this version or above without proper configaration.
|
|
47
311
|
|
|
48
312
|
# 0.0.1-beta.178
|
|
49
313
|
|
|
50
314
|
**Changes:**
|
|
51
315
|
|
|
52
316
|
- File support added for `.webp` for `docs`, `dev` and `prod` mode
|
|
53
|
-
- and this version has same as `0.0.1-exp.178.1`, `0.0.1-exp.178.2`
|
|
54
317
|
- File support added for `.webm` for `docs`, `dev` and `prod` mode
|
|
55
318
|
|
|
56
319
|
**Breaking Changes:**
|
|
57
320
|
|
|
58
|
-
- We have remove ssl certificate for security reasons.
|
|
59
|
-
So default https server won't run.
|
|
60
|
-
In order to make it work as before you
|
|
321
|
+
- We have remove ssl certificate for security reasons.
|
|
322
|
+
So default https server won't run.
|
|
323
|
+
In order to make it work as before you need to specify two things
|
|
61
324
|
1. install `@zohodesk-private/client_dev_cert`
|
|
62
|
-
2.
|
|
63
|
-
|
|
64
|
-
|
|
325
|
+
2. `react-cli.app.server.httpsCerts` option example `"httpsCerts": "@zohodesk-private/client_dev_cert"`
|
|
326
|
+
unless configaration are proper this may break `start` , `docs` , `nowatchstart`.
|
|
327
|
+
So Please be carefull when you update this version or above without proper configaration.
|
|
65
328
|
|
|
66
329
|
# 0.0.1-exp.178.2
|
|
67
330
|
|
|
@@ -73,13 +336,13 @@ Now to run app
|
|
|
73
336
|
|
|
74
337
|
**Breaking Changes:**
|
|
75
338
|
|
|
76
|
-
- We have remove ssl certificate for security reasons.
|
|
77
|
-
So default https server won't run.
|
|
78
|
-
In order to make it work as before you
|
|
339
|
+
- We have remove ssl certificate for security reasons.
|
|
340
|
+
So default https server won't run.
|
|
341
|
+
In order to make it work as before you need to specify two things
|
|
79
342
|
1. install `@zohodesk-private/client_dev_cert`
|
|
80
|
-
2.
|
|
81
|
-
|
|
82
|
-
|
|
343
|
+
2. `react-cli.app.server.httpsCerts` option example `"httpsCerts": "@zohodesk-private/client_dev_cert"`
|
|
344
|
+
unless configaration are proper this may break `start` , `docs` , `nowatchstart`.
|
|
345
|
+
So Please be carefull when you update this version or above without proper configaration.
|
|
83
346
|
|
|
84
347
|
# 0.0.1-beta.177
|
|
85
348
|
|
|
@@ -140,8 +403,8 @@ cli has been updated to fix compose issue faced when classname:hover exists and
|
|
|
140
403
|
|
|
141
404
|
**Feature:-**
|
|
142
405
|
|
|
143
|
-
- `react-cli.test.classnameFormat` option added to change CssModules (Ex: import style from "./a.module.css" ) className transform template unittest case.
|
|
144
|
-
|
|
406
|
+
- `react-cli.test.classnameFormat` option added to change CssModules (Ex: import style from "./a.module.css" ) className transform template unittest case.
|
|
407
|
+
`classnameFormat` default value `[classname]` you can customize it. Example: `[classname]-[hash]`
|
|
145
408
|
|
|
146
409
|
**Changes:-**
|
|
147
410
|
|
|
@@ -160,7 +423,7 @@ For an more information and reference, refer to `[details](https://zgit.csez.zoh
|
|
|
160
423
|
|
|
161
424
|
# 0.0.1-beta.172
|
|
162
425
|
|
|
163
|
-
We have renamed some options, For Our future features convenience.
|
|
426
|
+
We have renamed some options, For Our future features convenience.
|
|
164
427
|
We have given fallback support.
|
|
165
428
|
Deprecation Warnings:-
|
|
166
429
|
|
|
@@ -236,6 +499,11 @@ Features:-
|
|
|
236
499
|
|
|
237
500
|
- In docs we have added `Description` for Component Props- check out it in `PropTypes` tab
|
|
238
501
|
|
|
502
|
+
# 0.0.1-beta.167.1
|
|
503
|
+
|
|
504
|
+
In this version we merged changes from [0.0.1-betaa.138.1](#0.0.1-betaa.138.1).
|
|
505
|
+
and with [0.0.1-beta.167](#0.0.1-beta.167) version changes.
|
|
506
|
+
|
|
239
507
|
# 0.0.1-beta.167
|
|
240
508
|
|
|
241
509
|
SSL certificate update
|
|
@@ -497,6 +765,12 @@ impact servise related changes:-
|
|
|
497
765
|
- babel runtime plugin issue fix in prod config
|
|
498
766
|
- few enhancements
|
|
499
767
|
|
|
768
|
+
# 0.0.1-betaa.138.1
|
|
769
|
+
|
|
770
|
+
- new feature added for custom extra attribute for dynamically added tags by webpack.
|
|
771
|
+
- To enable this feature you need to enable "react-cli" => "app" => "customAttributes" => "enable"
|
|
772
|
+
- For more [details](https://zgit.csez.zohocorpin.com/zohodesk/react-cli/-/blob/9eea8df14e55584b2114b5e484ca8b751a4ba191/src/plugins/CustomAttributePlugin.md)
|
|
773
|
+
|
|
500
774
|
# 0.0.1-beta.138
|
|
501
775
|
|
|
502
776
|
- sstest library version updated
|
|
@@ -1135,3 +1409,7 @@ impact servise related changes:-
|
|
|
1135
1409
|
- prod string error fix
|
|
1136
1410
|
- efc build support
|
|
1137
1411
|
- single style tag support
|
|
1412
|
+
|
|
1413
|
+
```
|
|
1414
|
+
|
|
1415
|
+
```
|
package/bin/cli.js
CHANGED
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
const path = require('path');
|
|
4
|
-
const {
|
|
5
|
-
const
|
|
6
|
-
const { getOptions } = require('../lib/utils/index.js');
|
|
4
|
+
const { spawnSync: _spawnSync, execSync } = require('child_process');
|
|
5
|
+
const getOptions = require('../lib/utils/getOptions.js').default;
|
|
7
6
|
|
|
8
|
-
const { log } = require('../lib/utils');
|
|
7
|
+
const { log } = require('../lib/utils/log.js');
|
|
9
8
|
const { getCliPath } = require('../lib/servers/getCliPath.js');
|
|
9
|
+
const { runPreProcess } = require('../lib/common/runPreProcess.js');
|
|
10
10
|
//initPreCommitHook();
|
|
11
11
|
|
|
12
|
-
const
|
|
12
|
+
const [, , option] = process.argv;
|
|
13
|
+
const args = process.argv.slice(3);
|
|
14
|
+
const appPath = process.cwd();
|
|
15
|
+
|
|
16
|
+
const options = getOptions({ start: true, build: true, docs: true }[option]);
|
|
13
17
|
|
|
14
18
|
function spawnSync(...args) {
|
|
15
19
|
const result = _spawnSync(...args);
|
|
@@ -20,7 +24,6 @@ function spawnSync(...args) {
|
|
|
20
24
|
}
|
|
21
25
|
|
|
22
26
|
const { esLint: esLintOptions } = options || {};
|
|
23
|
-
const { preprocess } = options;
|
|
24
27
|
const {
|
|
25
28
|
ignoreFilePaths: esLintIgnorePaths,
|
|
26
29
|
fix: esLintFix,
|
|
@@ -28,10 +31,6 @@ const {
|
|
|
28
31
|
reportPath: reportPath
|
|
29
32
|
} = esLintOptions || {};
|
|
30
33
|
|
|
31
|
-
const [, , option] = process.argv;
|
|
32
|
-
const args = process.argv.slice(3);
|
|
33
|
-
const appPath = process.cwd();
|
|
34
|
-
|
|
35
34
|
const webpack = getCliPath('webpack');
|
|
36
35
|
|
|
37
36
|
const nodemon = getCliPath('nodemon');
|
|
@@ -39,49 +38,10 @@ const babel = getCliPath('babel');
|
|
|
39
38
|
const propertyToJson = getCliPath('propertyToJson');
|
|
40
39
|
const esLint = getCliPath('eslint');
|
|
41
40
|
|
|
42
|
-
|
|
43
|
-
? path.join(process.cwd(), preprocess.runner)
|
|
44
|
-
: '';
|
|
45
|
-
const preprocessCli = preprocess.stopNodemon ? 'node' : nodemon;
|
|
46
|
-
if (preprocesserPath && existsSync(preprocesserPath)) {
|
|
47
|
-
// eslint-disable-next-line default-case
|
|
48
|
-
switch (option) {
|
|
49
|
-
case 'start':
|
|
50
|
-
case 'docs':
|
|
51
|
-
spawn(preprocessCli, [preprocesserPath], {
|
|
52
|
-
stdio: 'inherit',
|
|
53
|
-
cwd: preprocesserPath.slice(0, preprocesserPath.lastIndexOf('/') + 1)
|
|
54
|
-
});
|
|
55
|
-
// NOTE: it's ok if we not close this here
|
|
56
|
-
// Because when node server stops this program willbe closed So this nodemon will be killed as well
|
|
57
|
-
break;
|
|
58
|
-
case 'nowatchstart':
|
|
59
|
-
case 'devbuild':
|
|
60
|
-
case 'build:library:es':
|
|
61
|
-
case 'build:component:es':
|
|
62
|
-
case 'build:library:cmjs':
|
|
63
|
-
case 'build:component:cmjs':
|
|
64
|
-
spawnSync('node', [preprocesserPath], {
|
|
65
|
-
stdio: 'inherit',
|
|
66
|
-
cwd: preprocesserPath.slice(0, preprocesserPath.lastIndexOf('/') + 1)
|
|
67
|
-
});
|
|
68
|
-
break;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
41
|
+
runPreProcess({ options, option, nodemon, spawnSync });
|
|
71
42
|
|
|
72
43
|
let result;
|
|
73
44
|
switch (option) {
|
|
74
|
-
case 'preprocessor':
|
|
75
|
-
if (preprocesserPath && existsSync(preprocesserPath)) {
|
|
76
|
-
result = spawnSync(preprocessCli, [preprocesserPath], {
|
|
77
|
-
stdio: 'inherit',
|
|
78
|
-
cwd: preprocesserPath.slice(0, preprocesserPath.lastIndexOf('/') + 1)
|
|
79
|
-
});
|
|
80
|
-
process.exit(result.status);
|
|
81
|
-
} else {
|
|
82
|
-
console.error(`preProcessor not exists ${preprocesserPath}`);
|
|
83
|
-
}
|
|
84
|
-
break;
|
|
85
45
|
case 'lint-setup': {
|
|
86
46
|
result = spawnSync(
|
|
87
47
|
'node',
|
|
@@ -116,6 +76,22 @@ switch (option) {
|
|
|
116
76
|
{ stdio: 'inherit' }
|
|
117
77
|
);
|
|
118
78
|
|
|
79
|
+
process.exit(result.status);
|
|
80
|
+
break;
|
|
81
|
+
case 'variableConverter':
|
|
82
|
+
result = spawnSync(
|
|
83
|
+
'node',
|
|
84
|
+
[require.resolve('../lib/utils/variableConverter')].concat(args),
|
|
85
|
+
{ stdio: 'inherit' }
|
|
86
|
+
);
|
|
87
|
+
process.exit(result.status);
|
|
88
|
+
break;
|
|
89
|
+
case 'selectorReplacer':
|
|
90
|
+
result = spawnSync(
|
|
91
|
+
'node',
|
|
92
|
+
[require.resolve('../lib/utils/selectorReplacer.js')].concat(args),
|
|
93
|
+
{ stdio: 'inherit' }
|
|
94
|
+
);
|
|
119
95
|
process.exit(result.status);
|
|
120
96
|
break;
|
|
121
97
|
case 'valuereplacer':
|
|
@@ -215,9 +191,7 @@ switch (option) {
|
|
|
215
191
|
case 'devbuild':
|
|
216
192
|
result = spawnSync(
|
|
217
193
|
'node',
|
|
218
|
-
[
|
|
219
|
-
require.resolve('../lib/servers/devBuild')
|
|
220
|
-
].concat(args),
|
|
194
|
+
[require.resolve('../lib/servers/devBuild')].concat(args),
|
|
221
195
|
// [require.resolve('../lib/servers/staticServer'), '--expose-http2'].concat(args),
|
|
222
196
|
{ stdio: 'inherit' }
|
|
223
197
|
);
|
|
@@ -256,7 +230,7 @@ switch (option) {
|
|
|
256
230
|
require.resolve('../lib/servers/mockserver.js'),
|
|
257
231
|
'--delay',
|
|
258
232
|
'2500ms',
|
|
259
|
-
'watch',
|
|
233
|
+
'--watch',
|
|
260
234
|
`${appPath + path.sep}mockapi`
|
|
261
235
|
].concat(args),
|
|
262
236
|
{ stdio: 'inherit' }
|
|
@@ -463,8 +437,9 @@ switch (option) {
|
|
|
463
437
|
case '--v':
|
|
464
438
|
case '-v':
|
|
465
439
|
log(`@zohodesk/react-cli v${require('../package.json').version}`);
|
|
440
|
+
log(`Node Js Version : ${process.version}`);
|
|
441
|
+
log(`Npm Version : ${execSync('npm --version')}`);
|
|
466
442
|
break;
|
|
467
|
-
|
|
468
443
|
default:
|
|
469
444
|
log(`react-cli > Unknown option "${option}"`);
|
|
470
445
|
log('react-cli app <appName>');
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Compose Minification
|
|
2
|
+
|
|
3
|
+
We use this plugin to extract all the common attributes ( margin, padding... ) supported and write them in respective common files( margin.css, padding.css... ) These are further reference to the classname instead of a line of code by composing and adding classnames for the same.
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
# Feature :
|
|
7
|
+
|
|
8
|
+
* We can enable this plugin by representing the value of ` react-cli > app > plugins > composeMinification ` to `true`.
|
|
9
|
+
* The creation of `margin.css`, `padding.css`, `position.css` and so on will be done initially by a manual script for the application.
|
|
10
|
+
* Further the `composeMinification` plugin converts the `props` of common attributes under check into `compose` and `values` into `compose format` ( m10 from `../margin.css`)
|
|
11
|
+
* On runtime the conversion takes place and classnames for the properties (`margin`, `padding`, so on...) are added with references to respective files and styles are applied.
|
|
12
|
+
|
|
13
|
+
|
package/docs/CustomChunks.md
CHANGED
|
@@ -4,23 +4,26 @@ In react-cli we provide options to create custom chunks.
|
|
|
4
4
|
This Custom Chunk Option is array of Object
|
|
5
5
|
that Object keys are
|
|
6
6
|
|
|
7
|
-
- `pattern` regex pattern as string
|
|
8
|
-
- `name` chunk name
|
|
9
|
-
- `size` is count which is
|
|
7
|
+
- `pattern` **{ String | Function | Array<String> }** regex pattern as string and custom logic to split chunks can be defined using function
|
|
8
|
+
- `name` **{ String }** chunk name
|
|
9
|
+
- `size` **{ Number }** is count which is minimum chunk duplicated or need in chunks
|
|
10
10
|
|
|
11
11
|
> Since 0.0.1-exp.164.1
|
|
12
12
|
|
|
13
13
|
extra features in custom chunks :-
|
|
14
14
|
for more details [SplitChunkPlugin](https://webpack.js.org/plugins/split-chunks-plugin/) webpack
|
|
15
15
|
|
|
16
|
-
- `minChunks`: `minChunks` is
|
|
17
|
-
- `rules`: `rules` is same as `pattern` with some easy hooks
|
|
16
|
+
- `minChunks`: `minChunks` is alias of `size` default value is `2`,
|
|
17
|
+
- `rules`: `rules` is same as `pattern` with some easy hooks **(removed after v1.1.5)**
|
|
18
18
|
- use `/` for both windows and linux we will replace internally
|
|
19
19
|
- for `.*` we need to use `*`
|
|
20
20
|
- we can consider rules as regex when the `rules-string` has any of these `*`, `^`, `$`. So if you want regex then kindly use `*` in your `rules-string` for force regex
|
|
21
21
|
- `chunks`: by this option we can specify , default value is `all`,
|
|
22
22
|
- `priority`: priority default value is `-10 * (index + 2)`,
|
|
23
|
-
- `enforce`: enforce default value is true
|
|
24
|
-
- `maxSize`: maxSize, default value is 0
|
|
25
|
-
- `minSize`: minSize, default value is 20000
|
|
26
|
-
|
|
23
|
+
- `enforce`: enforce default value is `true`,
|
|
24
|
+
- `maxSize`: maxSize, default value is `0`,
|
|
25
|
+
- `minSize`: minSize, default value is `20000`,
|
|
26
|
+
- `reuseExistingChunk` If the current chunk contains modules already split out from the main bundle, it will be reused instead of a new one being generated. This can affect the resulting file name of the chunk.
|
|
27
|
+
- `automaticNamePrefix` with this you can specify for chunks created through that specified config. default value `''`.
|
|
28
|
+
- `cacheGroupName`: `cacheGroupName` is alias of `name`, But it won't work as chunk name, instead it will just work as key in cacheGroup.
|
|
29
|
+
<!-- includeDependency: includeDependency default value is `false` -->
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
|
|
2
|
+
----> markdownParser <----
|
|
3
|
+
|
|
4
|
+
1. Markdown parser allows us to write Documentation using Markdown language inside the Javascript file
|
|
5
|
+
2. This will converts the snippets to HTML tag.
|
|
6
|
+
3. We can implement this only inside the particular syntax which is metioned below.
|
|
7
|
+
4. We can enable/disable this feature by `npm run docs --markdown_parser=true/false` default value will be `true`.
|
|
8
|
+
5. Also we can enable/disable this feature by adding `enableMDParser` key inside the package.json under the `docs`.
|
|
9
|
+
|
|
10
|
+
### syntax
|
|
11
|
+
```
|
|
12
|
+
/* MD:START
|
|
13
|
+
# Hello World
|
|
14
|
+
MD:END */
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
# v1.1.7 update:
|
|
18
|
+
* Markdown Parser feature implemented.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
|
|
2
|
+
----> ReactLive <----
|
|
3
|
+
|
|
4
|
+
1. React Live is a live playground for reactjs (For now we have implemented in our docs)
|
|
5
|
+
2. So, for this we are using reactLiveConverter.js (src/loaders) to convert the file format.
|
|
6
|
+
3. We can enable/disable this feature by `npm run docs --enableReactLive=true/false` default value will be `true`.
|
|
7
|
+
4. Also we can enable/disable this feature by adding `enableReactLive` key inside the package.json under the `docs`.
|
|
8
|
+
|
|
9
|
+
# v1.1.0 update:
|
|
10
|
+
* ReactLive feature implemented.
|
|
11
|
+
|
|
12
|
+
# v1.1.2 update:
|
|
13
|
+
|
|
14
|
+
* ReactLiveConverter filepath changed to 'reactLiveConverter.js' in docLoader file
|
package/docs/SelectorWeight.md
CHANGED
|
@@ -4,3 +4,6 @@
|
|
|
4
4
|
* all classes in all files will be added with the `defaultSelector` provided in package.json to increase selector weight
|
|
5
5
|
* in case a specific chunk file is supposed to have a different selector, it can be mentioned in the `customFileSelectorWeight.json`. This will add the new selector to that particular chunk file.
|
|
6
6
|
* `excludeStrings` is an array used to exclude selectors that should not be converted. Default selectors such as body, html are excluded through this way.
|
|
7
|
+
|
|
8
|
+
# v1.0.1 update:
|
|
9
|
+
* exclude support added, file paths to be added in `react-cli > app > exclude > selectorWeight` to be excluded from conversion.
|
package/docs/ValueReplacer.md
CHANGED
|
@@ -58,3 +58,30 @@ new option `valueReplacer` added for replace css property value while build runn
|
|
|
58
58
|
font: zdf-rCallBar_1 !important;
|
|
59
59
|
}
|
|
60
60
|
```
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
If we need the exact word to be considered for replacement ( that is, if value is `text` and only if the value is `text` and not `text_cursor` or `cursortext` for example, the conversion happens ) we have to use `^` before the word and `$` after the word in the key.
|
|
64
|
+
|
|
65
|
+
# For Example :
|
|
66
|
+
{
|
|
67
|
+
valueReplacer: [
|
|
68
|
+
{
|
|
69
|
+
"props": [
|
|
70
|
+
"cursor",
|
|
71
|
+
"--label_cursor",
|
|
72
|
+
"--checkbox_cursor",
|
|
73
|
+
"--tag_cursor",
|
|
74
|
+
"--button_cursor",
|
|
75
|
+
"--textboxicon_icon_cursor",
|
|
76
|
+
],
|
|
77
|
+
"values": {
|
|
78
|
+
"^default$": "var(--zdr-cursor-default)",
|
|
79
|
+
"^pointer$": "var(--zdr-cursor-pointer)",
|
|
80
|
+
"^text$": "var(--zdr-cursor-text)",
|
|
81
|
+
"^move$": "var(--zdr-cursor-move)",
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
]
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
- Here we have added `^` before and `$` after default, pointer, text and move. Only if the exact words default, pointer, text and move are used, the values will be converted.
|
|
@@ -4,8 +4,13 @@
|
|
|
4
4
|
|
|
5
5
|
Conversion for Variables from Variables to px in Supportapp completed (`variableIgnore.js` && `pxParserPostcss.js` to be referred to), and px to custom variables through the new `variableModificationPlugin`. Error Log generation can also be converted on enabling
|
|
6
6
|
|
|
7
|
+
|
|
8
|
+
**Issue Fix**
|
|
9
|
+
# Issue fix done in `1.0.1`
|
|
10
|
+
- variable conversion for px and var(--) values in same declaration was not supported, now it is supported.
|
|
11
|
+
|
|
7
12
|
**Features:**
|
|
8
|
-
# Features below are added
|
|
13
|
+
# Features below are added from `0.0.1-beta.173`
|
|
9
14
|
1. variables are converted from px to custom variables ( options are consumed from `cssVariableReplacementOptions.json` present in source folder )
|
|
10
15
|
2. To enable the error log generation `errorLog` is to be made `true` in `cssVariableReplacementOptions.json` ( it will take a little longer than usual build time )
|
|
11
16
|
3. To enable the console display of errors that are generated, `errorInConsole` is to be made `true` in `cssVariableReplacementOptions.json`
|