@zohodesk/react-cli 1.1.7 → 1.1.8-exp.1
Sign up to get free protection for your applications and to get access to all the features.
- package/.eslintignore +7 -7
- package/.eslintrc.js +180 -180
- package/.prettierrc +6 -6
- package/Changelog.md +1019 -1019
- package/README.md +1293 -1251
- package/bin/cli.js +497 -497
- package/docs/ComposeMinification.md +13 -13
- package/docs/CustomChunks.md +29 -26
- package/docs/DevServerPort.md +39 -39
- package/docs/DevStart.md +18 -18
- package/docs/HoverActive.md +12 -12
- package/docs/InstallNode.md +28 -28
- package/docs/MarkdownParser.md +17 -17
- package/docs/ReactLive.md +13 -13
- package/docs/SelectorWeight.md +8 -8
- package/docs/TODOS.md +10 -10
- package/docs/ValueReplacer.md +60 -60
- package/docs/VariableConversion.md +729 -729
- package/docs/patternFiltering.md +56 -56
- package/docs/warnings_while_install.txt +35 -35
- package/files/eslintrc.js +62 -62
- package/files/prettierrc.js +3 -3
- package/lib/common/splitChunks.js +65 -45
- package/lib/common/testPattern.js +9 -9
- package/lib/configs/webpack.css.umd.config.js +4 -4
- package/lib/configs/webpack.dev.config.js +24 -3
- package/lib/configs/webpack.docs.config.js +22 -3
- package/lib/configs/webpack.impact.config.js +4 -2
- package/lib/configs/webpack.prod.config.js +6 -3
- package/lib/deprecationLogger.js +41 -0
- package/lib/loaderUtils/configsAssetsLoaders.js +33 -33
- package/lib/loaderUtils/getCSSLoaders.js +77 -56
- package/lib/loaders/workerLoader.js +9 -9
- package/lib/pluginUtils/getDevPlugins.js +8 -7
- package/lib/pluginUtils/getProdPlugins.js +6 -6
- package/lib/plugins/CustomAttributePlugin.md +35 -35
- 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 +95 -95
- package/lib/plugins/I18nSplitPlugin/README.md +25 -25
- package/lib/plugins/I18nSplitPlugin/index.js +57 -57
- package/lib/plugins/ResourceHintsPlugin.js +30 -20
- package/lib/plugins/RtlSplitPlugin/RtlCssPlugin.js +6 -6
- package/lib/plugins/RtlSplitPlugin/RtrSplit.md +30 -30
- package/lib/plugins/SelectorPlugin.js +29 -29
- package/lib/plugins/ServiceWorkerPlugin.js +9 -9
- package/lib/plugins/TPHashMappingPlugin.js +4 -4
- package/lib/plugins/VariableConversionCollector.js +59 -59
- package/lib/plugins/utils/fileHandling.js +35 -42
- package/lib/plugins/variableConvertorUtils.js +9 -9
- package/lib/postcss-plugins/RTLSplitPlugin.js +10 -10
- package/lib/postcss-plugins/__test__/test1Input.css +38 -38
- package/lib/postcss-plugins/__test__/test1Output.css +38 -38
- package/lib/postcss-plugins/hoverActivePlugin.js +3 -3
- package/lib/schemas/index.js +19 -36
- 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/cssClassNameGenerate.js +13 -13
- package/lib/utils/deprecationSupport.js +144 -0
- package/lib/utils/getOptions.js +18 -78
- package/lib/utils/resultSchema.json +73 -73
- package/npm-shrinkwrap.json +33393 -33393
- package/npm8.md +9 -9
- package/package.json +123 -123
- package/postpublish.js +8 -8
- package/result.json +1 -0
- 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 +250 -250
- package/templates/docs/component.html +179 -179
- package/templates/docs/components.html +222 -222
- 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/markdown.css +202 -202
- package/templates/docs/css/style.css +1022 -1022
- package/templates/docs/impactReportTemplate.html +154 -154
- package/templates/docs/index.html +1502 -1502
- 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
- package/unittest/index.html +37 -0
@@ -86,20 +86,20 @@ class SelectorPlugin {
|
|
86
86
|
const rootOriginal = _postcss.default.parse(module.content);
|
87
87
|
|
88
88
|
const filename = module.issuer.resource;
|
89
|
-
/*
|
90
|
-
input :
|
91
|
-
filename : 'D:/MyWork/..../desk_client_app/supportapp/src/components/Avatar/Avatar.module.css,
|
92
|
-
|
93
|
-
|
94
|
-
// include src folder, include deskapp folder, exclude node modules
|
95
|
-
"selectorWeight": [
|
96
|
-
"src",
|
97
|
-
"deskapp",
|
98
|
-
"!node_modules"
|
99
|
-
]
|
100
|
-
|
101
|
-
output :
|
102
|
-
true or false
|
89
|
+
/*
|
90
|
+
input :
|
91
|
+
filename : 'D:/MyWork/..../desk_client_app/supportapp/src/components/Avatar/Avatar.module.css,
|
92
|
+
|
93
|
+
patterns.cssVariableReplacement:
|
94
|
+
// include src folder, include deskapp folder, exclude node modules
|
95
|
+
"selectorWeight": [
|
96
|
+
"src",
|
97
|
+
"deskapp",
|
98
|
+
"!node_modules"
|
99
|
+
]
|
100
|
+
|
101
|
+
output :
|
102
|
+
true or false
|
103
103
|
*/
|
104
104
|
|
105
105
|
if (!(0, _fileHandling.isFileNameMatchingPluginPattern)({
|
@@ -108,21 +108,21 @@ class SelectorPlugin {
|
|
108
108
|
})) {
|
109
109
|
return;
|
110
110
|
}
|
111
|
-
/*
|
112
|
-
|
113
|
-
filename : Deskapp.module.css ?
|
114
|
-
|
115
|
-
{
|
116
|
-
"DeskApp.module.css": {"defaultSelector" : ".desk_app_ui "}
|
117
|
-
}
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
case filename = 'DeskApp.module.css' ?
|
122
|
-
data[filename].defaultSelector = '.desk_app_ui'
|
123
|
-
|
124
|
-
defaultSelector = '.zoho_desk_ui'
|
125
|
-
|
111
|
+
/*
|
112
|
+
|
113
|
+
filename : Deskapp.module.css ?
|
114
|
+
data :
|
115
|
+
{
|
116
|
+
"DeskApp.module.css": {"defaultSelector" : ".desk_app_ui "}
|
117
|
+
}
|
118
|
+
selectorWeightConfig :
|
119
|
+
defaultSelector : .zoho_desk_ui
|
120
|
+
|
121
|
+
case filename = 'DeskApp.module.css' ?
|
122
|
+
data[filename].defaultSelector = '.desk_app_ui'
|
123
|
+
case filename is different ?
|
124
|
+
defaultSelector = '.zoho_desk_ui'
|
125
|
+
*/
|
126
126
|
|
127
127
|
|
128
128
|
module.content = selectorWeightPrefixAdder(rootOriginal, data[filename] ? data[filename].defaultSelector : defaultSelector, excludeStrings).toString();
|
@@ -51,11 +51,11 @@ class ServiceWorkerPlugin {
|
|
51
51
|
if (err) {
|
52
52
|
throw new Error(err);
|
53
53
|
} else {
|
54
|
-
/* const extractedChunks = compilation.chunks.filter(chunk => {
|
55
|
-
if ('canBeInitial' in chunk) {
|
56
|
-
return chunk.canBeInitial();
|
57
|
-
}
|
58
|
-
return chunk.isInitial();
|
54
|
+
/* const extractedChunks = compilation.chunks.filter(chunk => {
|
55
|
+
if ('canBeInitial' in chunk) {
|
56
|
+
return chunk.canBeInitial();
|
57
|
+
}
|
58
|
+
return chunk.isInitial();
|
59
59
|
}); */
|
60
60
|
// let [js, css, , , i18nPublicPath] = this.publicPaths;
|
61
61
|
// let initialChunkUrls = [];
|
@@ -64,10 +64,10 @@ class ServiceWorkerPlugin {
|
|
64
64
|
let entrypoint = compilation.entrypoints.get('main');
|
65
65
|
let initialChunkUrls = entrypoint.getFiles();
|
66
66
|
const cssDirTemplate = '@dir@';
|
67
|
-
/**
|
68
|
-
* NOTE:
|
69
|
-
* if chunkSplitEnable is false means,
|
70
|
-
* serviceWorker will get i18n files path for html
|
67
|
+
/**
|
68
|
+
* NOTE:
|
69
|
+
* if chunkSplitEnable is false means,
|
70
|
+
* serviceWorker will get i18n files path for html
|
71
71
|
*/
|
72
72
|
|
73
73
|
let initalI18nAssets = chunkSplitEnable ? entrypoint.chunks.filter(chunk => _I18nKeysIdentifer.default.isChunkHasI18n(chunk)).map(chunk => (0, _getI18nFileUrlPathTemplate.getI18nFileUrlPathTemplate)(compilation, chunk, this.i18nFileNameTemplate, '@locale@')) : [];
|
@@ -15,10 +15,10 @@ var _crypto = _interopRequireDefault(require("crypto"));
|
|
15
15
|
|
16
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
17
17
|
|
18
|
-
/**
|
19
|
-
* Plugin that generates hash for the provided list of third party files
|
20
|
-
* Map the provided key with the file hash and add it to the list of exisiting global constants.
|
21
|
-
* Plugin in turn uses the defineplugin to generate global constants.
|
18
|
+
/**
|
19
|
+
* Plugin that generates hash for the provided list of third party files
|
20
|
+
* Map the provided key with the file hash and add it to the list of exisiting global constants.
|
21
|
+
* Plugin in turn uses the defineplugin to generate global constants.
|
22
22
|
*/
|
23
23
|
class TPHashMappingPlugin {
|
24
24
|
constructor(options) {
|
@@ -28,14 +28,14 @@ const {
|
|
28
28
|
|
29
29
|
const supportedProps = ['font-size', 'margin', 'margin-top', 'margin-bottom', 'margin-left', 'margin-right', 'padding', 'padding-top', 'padding-bottom', 'padding-left', 'padding-right', '^top', '^right', '^bottom', '^left', '^width', 'min-width', 'max-width', '^height', 'min-height', 'max-height', 'text-indent', 'clip', 'flex-basis', 'row-gap', 'gap', 'column-gap', 'flex']; // -- to convert the hyphen values to values --
|
30
30
|
|
31
|
-
/*
|
32
|
-
input :
|
33
|
-
var(--zdt_uploadlist_default_width)
|
34
|
-
output :
|
35
|
-
--zdt_uploadlist_default_width
|
36
|
-
|
37
|
-
comment :
|
38
|
-
to make the variable object using the output as key and decl.prop such as font-size as value
|
31
|
+
/*
|
32
|
+
input :
|
33
|
+
var(--zdt_uploadlist_default_width)
|
34
|
+
output :
|
35
|
+
--zdt_uploadlist_default_width
|
36
|
+
|
37
|
+
comment :
|
38
|
+
to make the variable object using the output as key and decl.prop such as font-size as value
|
39
39
|
*/
|
40
40
|
|
41
41
|
function createFolderIfNonExistant(path) {
|
@@ -95,13 +95,13 @@ class VariableConversionCollector {
|
|
95
95
|
}
|
96
96
|
};
|
97
97
|
}
|
98
|
-
/*
|
99
|
-
purpose of tap : to create a variable object such as:
|
100
|
-
{
|
101
|
-
--zdt_uploadlist_default_width : width,
|
102
|
-
--zdt_uploadlist_default_height : height,
|
103
|
-
}
|
104
|
-
which will help in the conversion further
|
98
|
+
/*
|
99
|
+
purpose of tap : to create a variable object such as:
|
100
|
+
{
|
101
|
+
--zdt_uploadlist_default_width : width,
|
102
|
+
--zdt_uploadlist_default_height : height,
|
103
|
+
}
|
104
|
+
which will help in the conversion further
|
105
105
|
*/
|
106
106
|
|
107
107
|
|
@@ -153,19 +153,19 @@ class VariableConversionCollector {
|
|
153
153
|
});
|
154
154
|
});
|
155
155
|
});
|
156
|
-
/*
|
157
|
-
current value example:
|
158
|
-
{
|
159
|
-
--zdt_uploadlist_default_width : --zd_upload_width,
|
160
|
-
--zd_upload_width : width
|
161
|
-
}
|
162
|
-
expected value :
|
163
|
-
{
|
164
|
-
--zdt_uploadlist_default_width : width,
|
165
|
-
--zd_upload_width : width
|
166
|
-
}
|
167
|
-
|
168
|
-
conversion is done in the while loop below
|
156
|
+
/*
|
157
|
+
current value example:
|
158
|
+
{
|
159
|
+
--zdt_uploadlist_default_width : --zd_upload_width,
|
160
|
+
--zd_upload_width : width
|
161
|
+
}
|
162
|
+
expected value :
|
163
|
+
{
|
164
|
+
--zdt_uploadlist_default_width : width,
|
165
|
+
--zd_upload_width : width
|
166
|
+
}
|
167
|
+
|
168
|
+
conversion is done in the while loop below
|
169
169
|
*/
|
170
170
|
|
171
171
|
Object.keys(variables).forEach(key => {
|
@@ -177,37 +177,37 @@ class VariableConversionCollector {
|
|
177
177
|
});
|
178
178
|
}); // -- conversion for the root using variableConvertor --
|
179
179
|
|
180
|
-
/*
|
181
|
-
input :
|
182
|
-
.a{
|
183
|
-
padding : 20px
|
184
|
-
}
|
185
|
-
output :
|
186
|
-
// on settingObject file :
|
187
|
-
{ padding : { replacements : { px : 'zd_size$$' }}}
|
188
|
-
.a{
|
189
|
-
padding : zd_size20;
|
190
|
-
}
|
180
|
+
/*
|
181
|
+
input :
|
182
|
+
.a{
|
183
|
+
padding : 20px
|
184
|
+
}
|
185
|
+
output :
|
186
|
+
// on settingObject file :
|
187
|
+
{ padding : { replacements : { px : 'zd_size$$' }}}
|
188
|
+
.a{
|
189
|
+
padding : zd_size20;
|
190
|
+
}
|
191
191
|
*/
|
192
192
|
|
193
193
|
compilation.hooks.optimizeModules.tap('VariableConversionCollector', modules => {
|
194
194
|
const mods = modules.filter(x => x.type.includes('css'));
|
195
195
|
mods.forEach(module => {
|
196
196
|
const filename = module.issuer.resource;
|
197
|
-
/*
|
198
|
-
input :
|
199
|
-
filename : 'D:/MyWork/..../desk_client_app/supportapp/src/components/Avatar/Avatar.module.css,
|
200
|
-
|
201
|
-
|
202
|
-
// include src folder, include deskapp folder, exclude node modules
|
203
|
-
"cssVariableReplacement": [
|
204
|
-
"src",
|
205
|
-
"deskapp",
|
206
|
-
"!node_modules"
|
207
|
-
]
|
208
|
-
|
209
|
-
output :
|
210
|
-
true or false
|
197
|
+
/*
|
198
|
+
input :
|
199
|
+
filename : 'D:/MyWork/..../desk_client_app/supportapp/src/components/Avatar/Avatar.module.css,
|
200
|
+
|
201
|
+
patterns.cssVariableReplacement:
|
202
|
+
// include src folder, include deskapp folder, exclude node modules
|
203
|
+
"cssVariableReplacement": [
|
204
|
+
"src",
|
205
|
+
"deskapp",
|
206
|
+
"!node_modules"
|
207
|
+
]
|
208
|
+
|
209
|
+
output :
|
210
|
+
true or false
|
211
211
|
*/
|
212
212
|
|
213
213
|
if (!(0, _fileHandling.isFileNameMatchingPluginPattern)({
|
@@ -223,12 +223,12 @@ class VariableConversionCollector {
|
|
223
223
|
});
|
224
224
|
});
|
225
225
|
});
|
226
|
-
/*
|
227
|
-
purpose of tap : to display the errors encountered so far
|
228
|
-
input :
|
229
|
-
all css files
|
230
|
-
output :
|
231
|
-
all errors that are present in the errTable arr
|
226
|
+
/*
|
227
|
+
purpose of tap : to display the errors encountered so far
|
228
|
+
input :
|
229
|
+
all css files
|
230
|
+
output :
|
231
|
+
all errors that are present in the errTable arr
|
232
232
|
*/
|
233
233
|
|
234
234
|
compiler.hooks.afterEmit.tap('error-display', () => {
|
@@ -6,15 +6,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
exports.isFileNameMatchingPattern = isFileNameMatchingPattern;
|
7
7
|
exports.isFileNameMatchingPluginPattern = isFileNameMatchingPluginPattern;
|
8
8
|
|
9
|
-
var _windowsModification = require("../../loaderUtils/windowsModification");
|
10
|
-
|
11
9
|
var _ignore = _interopRequireDefault(require("ignore"));
|
12
10
|
|
13
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
14
12
|
|
15
13
|
const path = require('path');
|
16
14
|
|
17
|
-
|
15
|
+
const aliasNames = {
|
18
16
|
valueReplacer: 'postcss-value-replacer',
|
19
17
|
selectorReplace: 'postcss-selector-replace-new',
|
20
18
|
hasRTL: 'postcss-rtl',
|
@@ -23,10 +21,10 @@ let aliasNames = {
|
|
23
21
|
cssVariableReplacement: 'postcss-variable-report',
|
24
22
|
composeMinification: 'postcss-compose-plugin'
|
25
23
|
};
|
26
|
-
/*
|
27
|
-
|
28
|
-
unique scenario
|
29
|
-
|
24
|
+
/*
|
25
|
+
|
26
|
+
unique scenario
|
27
|
+
|
30
28
|
*/
|
31
29
|
// export function filterFileCssUniqueness(filename, filterObj) {
|
32
30
|
// let rootDir = 'supportapp';
|
@@ -48,48 +46,43 @@ unique scenario
|
|
48
46
|
function isFileNameMatchingPattern({
|
49
47
|
filename,
|
50
48
|
filterObject,
|
51
|
-
plugins
|
49
|
+
plugins,
|
50
|
+
order
|
52
51
|
}) {
|
52
|
+
const pluginObj = {};
|
53
|
+
plugins.forEach(p => {
|
54
|
+
pluginObj[p.postcssPlugin] = p;
|
55
|
+
});
|
53
56
|
const finalPlugins = [];
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
57
|
+
order.forEach(key => {
|
58
|
+
const p = pluginObj[aliasNames[key]];
|
59
|
+
const pluginSpecificFilter = filterObject[key];
|
60
|
+
|
61
|
+
if (!pluginSpecificFilter || pluginSpecificFilter.length === 0) {
|
62
|
+
finalPlugins.push(p);
|
63
|
+
} else {
|
64
|
+
// eslint-disable-next-line no-use-before-define
|
65
|
+
const isMatching = isFilePathMatchingPattern(filename, pluginSpecificFilter);
|
66
|
+
|
67
|
+
if (isMatching) {
|
68
|
+
finalPlugins.push(p);
|
64
69
|
}
|
65
|
-
}
|
66
|
-
});
|
70
|
+
}
|
71
|
+
});
|
72
|
+
return finalPlugins;
|
73
|
+
}
|
67
74
|
|
68
|
-
|
75
|
+
function isFilePathMatchingPattern(filePath, patterns) {
|
76
|
+
const ig = (0, _ignore.default)({
|
77
|
+
allowRelativePaths: true
|
78
|
+
}).add(patterns);
|
79
|
+
return ig.ignores(filePath);
|
69
80
|
}
|
70
81
|
|
71
82
|
function isFileNameMatchingPluginPattern({
|
72
83
|
filename,
|
73
|
-
filterArr
|
74
|
-
|
84
|
+
filterArr
|
75
85
|
}) {
|
76
|
-
|
77
|
-
|
78
|
-
// const regex = `^(.+?)${rootDir}?\\\\`;
|
79
|
-
// console.log(plugin);
|
80
|
-
|
81
|
-
const newFilename = path.relative(path.parse(process.cwd()).base, filename); // const newFilename = windowsModificationFile(filename).replace(
|
82
|
-
// new RegExp(regex, 'gi'),
|
83
|
-
// ''
|
84
|
-
// );
|
85
|
-
|
86
|
-
const ig = (0, _ignore.default)({
|
87
|
-
allowRelativePaths: true
|
88
|
-
}).add(filterArr);
|
89
|
-
|
90
|
-
if (!ig.ignores(newFilename)) {
|
91
|
-
include = false;
|
92
|
-
}
|
93
|
-
|
94
|
-
return include;
|
86
|
+
const newFilename = path.relative(path.parse(process.cwd()).base, filename);
|
87
|
+
return isFilePathMatchingPattern(newFilename, filterArr);
|
95
88
|
}
|
@@ -12,15 +12,15 @@ var _classHandling = require("./utils/classHandling");
|
|
12
12
|
const ignoreVals = ['--zd_size', '--zd_font_size', '--size', '--size_']; // const avoidProps = [];
|
13
13
|
// -- is issue IO --
|
14
14
|
|
15
|
-
/*
|
16
|
-
issues eg :
|
17
|
-
issues = ['--zd_size', '--zd_font_size', '--size', '--size_'];
|
18
|
-
input :
|
19
|
-
--zd_size
|
20
|
-
output :
|
21
|
-
true
|
22
|
-
comment :
|
23
|
-
do not execute when --zd_size comes as prop
|
15
|
+
/*
|
16
|
+
issues eg :
|
17
|
+
issues = ['--zd_size', '--zd_font_size', '--size', '--size_'];
|
18
|
+
input :
|
19
|
+
--zd_size
|
20
|
+
output :
|
21
|
+
true
|
22
|
+
comment :
|
23
|
+
do not execute when --zd_size comes as prop
|
24
24
|
*/
|
25
25
|
|
26
26
|
exports.ignoreVals = ignoreVals;
|
@@ -37,11 +37,11 @@ function selectorMinifySameDir(selector, direction) {
|
|
37
37
|
const regex = getRegex(direction);
|
38
38
|
return selector.replace(regex, '').trim();
|
39
39
|
}
|
40
|
-
/**
|
41
|
-
* this funtion will remove given rule,
|
42
|
-
* if given selector and it's previous sibiling rule selector are same
|
43
|
-
* current rule properties will move to previous sibiling rule.
|
44
|
-
* @param {Rule} rule current rule
|
40
|
+
/**
|
41
|
+
* this funtion will remove given rule,
|
42
|
+
* if given selector and it's previous sibiling rule selector are same
|
43
|
+
* current rule properties will move to previous sibiling rule.
|
44
|
+
* @param {Rule} rule current rule
|
45
45
|
*/
|
46
46
|
|
47
47
|
|
@@ -56,11 +56,11 @@ function mergeIfSameSelector(rule) {
|
|
56
56
|
rule.remove();
|
57
57
|
}
|
58
58
|
}
|
59
|
-
/**
|
60
|
-
* this funtion will remove given rule,
|
61
|
-
* if given selector and it's previous sibiling rule selector are same
|
62
|
-
* current rule properties will move to previous sibiling rule.
|
63
|
-
* @param {Rule} rule current rule
|
59
|
+
/**
|
60
|
+
* this funtion will remove given rule,
|
61
|
+
* if given selector and it's previous sibiling rule selector are same
|
62
|
+
* current rule properties will move to previous sibiling rule.
|
63
|
+
* @param {Rule} rule current rule
|
64
64
|
*/
|
65
65
|
|
66
66
|
|
@@ -1,39 +1,39 @@
|
|
1
|
-
/*Hover_active:ignore*/
|
2
|
-
g,a:hover{
|
3
|
-
color : red
|
4
|
-
}
|
5
|
-
/*Hover:ignore*/
|
6
|
-
h:hover{
|
7
|
-
background : yellow
|
8
|
-
}
|
9
|
-
|
10
|
-
/* Hover_active:ignore */
|
11
|
-
g,d+e:hover{
|
12
|
-
color : black
|
13
|
-
}
|
14
|
-
|
15
|
-
g,d e:hover{
|
16
|
-
color : black
|
17
|
-
}
|
18
|
-
|
19
|
-
@media screen and (max-width:61.25em){
|
20
|
-
/* Hover_active:ignore */
|
21
|
-
a,b,a:hover, b:hover{
|
22
|
-
background-color : blue
|
23
|
-
}
|
24
|
-
a + b,a:hover + b:hover{
|
25
|
-
background-color : blue
|
26
|
-
}
|
27
|
-
a b:hover{
|
28
|
-
background-color : blue
|
29
|
-
}
|
30
|
-
|
31
|
-
.cc:hover {
|
32
|
-
color: red;
|
33
|
-
}
|
34
|
-
|
35
|
-
c:hover{
|
36
|
-
color : red
|
37
|
-
}
|
38
|
-
|
1
|
+
/*Hover_active:ignore*/
|
2
|
+
g,a:hover{
|
3
|
+
color : red
|
4
|
+
}
|
5
|
+
/*Hover:ignore*/
|
6
|
+
h:hover{
|
7
|
+
background : yellow
|
8
|
+
}
|
9
|
+
|
10
|
+
/* Hover_active:ignore */
|
11
|
+
g,d+e:hover{
|
12
|
+
color : black
|
13
|
+
}
|
14
|
+
|
15
|
+
g,d e:hover{
|
16
|
+
color : black
|
17
|
+
}
|
18
|
+
|
19
|
+
@media screen and (max-width:61.25em){
|
20
|
+
/* Hover_active:ignore */
|
21
|
+
a,b,a:hover, b:hover{
|
22
|
+
background-color : blue
|
23
|
+
}
|
24
|
+
a + b,a:hover + b:hover{
|
25
|
+
background-color : blue
|
26
|
+
}
|
27
|
+
a b:hover{
|
28
|
+
background-color : blue
|
29
|
+
}
|
30
|
+
|
31
|
+
.cc:hover {
|
32
|
+
color: red;
|
33
|
+
}
|
34
|
+
|
35
|
+
c:hover{
|
36
|
+
color : red
|
37
|
+
}
|
38
|
+
|
39
39
|
}
|
@@ -1,39 +1,39 @@
|
|
1
|
-
/*Hover_active:ignore*/
|
2
|
-
g,a:hover{
|
3
|
-
color : red
|
4
|
-
}
|
5
|
-
/*Hover:ignore*/
|
6
|
-
h:hover{
|
7
|
-
background : yellow
|
8
|
-
}
|
9
|
-
|
10
|
-
/* Hover_active:ignore */
|
11
|
-
g,d+e:hover{
|
12
|
-
color : black
|
13
|
-
}
|
14
|
-
|
15
|
-
g,d e:hover{
|
16
|
-
color : black
|
17
|
-
}
|
18
|
-
|
19
|
-
@media screen and (max-width:61.25em){
|
20
|
-
/* Hover_active:ignore */
|
21
|
-
a,b,a:hover, b:hover{
|
22
|
-
background-color : blue
|
23
|
-
}
|
24
|
-
a + b,a:hover + b:hover{
|
25
|
-
background-color : blue
|
26
|
-
}
|
27
|
-
a b:hover{
|
28
|
-
background-color : blue
|
29
|
-
}
|
30
|
-
|
31
|
-
.cc:hover {
|
32
|
-
color: red;
|
33
|
-
}
|
34
|
-
|
35
|
-
c:hover{
|
36
|
-
color : red
|
37
|
-
}
|
38
|
-
|
1
|
+
/*Hover_active:ignore*/
|
2
|
+
g,a:hover{
|
3
|
+
color : red
|
4
|
+
}
|
5
|
+
/*Hover:ignore*/
|
6
|
+
h:hover{
|
7
|
+
background : yellow
|
8
|
+
}
|
9
|
+
|
10
|
+
/* Hover_active:ignore */
|
11
|
+
g,d+e:hover{
|
12
|
+
color : black
|
13
|
+
}
|
14
|
+
|
15
|
+
g,d e:hover{
|
16
|
+
color : black
|
17
|
+
}
|
18
|
+
|
19
|
+
@media screen and (max-width:61.25em){
|
20
|
+
/* Hover_active:ignore */
|
21
|
+
a,b,a:hover, b:hover{
|
22
|
+
background-color : blue
|
23
|
+
}
|
24
|
+
a + b,a:hover + b:hover{
|
25
|
+
background-color : blue
|
26
|
+
}
|
27
|
+
a b:hover{
|
28
|
+
background-color : blue
|
29
|
+
}
|
30
|
+
|
31
|
+
.cc:hover {
|
32
|
+
color: red;
|
33
|
+
}
|
34
|
+
|
35
|
+
c:hover{
|
36
|
+
color : red
|
37
|
+
}
|
38
|
+
|
39
39
|
}
|
@@ -4,9 +4,9 @@ var _postcss = _interopRequireDefault(require("postcss"));
|
|
4
4
|
|
5
5
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
6
6
|
|
7
|
-
/**
|
8
|
-
* we have give support for ignore(exclude) comments
|
9
|
-
* These are the comments' keyword
|
7
|
+
/**
|
8
|
+
* we have give support for ignore(exclude) comments
|
9
|
+
* These are the comments' keyword
|
10
10
|
*/
|
11
11
|
const hoverIgnoreQuery = 'Hover:ignore',
|
12
12
|
activeIgnoreQuery = 'Active:ignore',
|