@zohodesk/react-cli 0.0.1-exp.169.1 → 0.0.1-exp.169.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 (114) hide show
  1. package/.eslintignore +7 -7
  2. package/.eslintrc.js +179 -179
  3. package/.prettierrc +6 -6
  4. package/README.md +951 -946
  5. package/bin/cli.js +483 -483
  6. package/cert/Tsicsezwild-22-23.crt +37 -37
  7. package/cert/Tsicsezwild-22-23.key +27 -27
  8. package/docs/CustomChunks.md +26 -26
  9. package/docs/DevStart.md +18 -18
  10. package/docs/HoverActive.md +12 -12
  11. package/docs/InstallNode.md +28 -28
  12. package/docs/TODOS.md +10 -10
  13. package/docs/ValueReplacer.md +60 -60
  14. package/docs/warnings_while_install.txt +35 -35
  15. package/files/eslintrc.js +62 -62
  16. package/files/prettierrc.js +3 -3
  17. package/lib/configs/jest.config.js +3 -1
  18. package/lib/configs/webpack.css.umd.config.js +4 -4
  19. package/lib/configs/webpack.dev.config.js +4 -6
  20. package/lib/configs/webpack.docs.config.js +3 -5
  21. package/lib/configs/webpack.impact.config.js +3 -5
  22. package/lib/configs/webpack.prod.config.js +4 -6
  23. package/lib/jest/preProcessors/cssPreprocessor.js +0 -2
  24. package/lib/loaderUtils/configsAssetsLoaders.js +33 -33
  25. package/lib/loaderUtils/getCSSLoaders.js +22 -5
  26. package/lib/loaders/workerLoader.js +9 -9
  27. package/lib/pluginUtils/getDevPlugins.js +5 -5
  28. package/lib/pluginUtils/getProdPlugins.js +5 -5
  29. package/lib/plugins/EFCPlugin.md +6 -6
  30. package/lib/plugins/I18NInjectIntoIndexPlugin.js +4 -4
  31. package/lib/plugins/I18nSplitPlugin/I18nDownlodLogic.js +38 -38
  32. package/lib/plugins/I18nSplitPlugin/I18nFilesEmitter.js +30 -30
  33. package/lib/plugins/I18nSplitPlugin/I18nKeysIdentifer.js +8 -8
  34. package/lib/plugins/I18nSplitPlugin/I18nSplit.md +95 -95
  35. package/lib/plugins/I18nSplitPlugin/README.md +25 -25
  36. package/lib/plugins/I18nSplitPlugin/index.js +57 -57
  37. package/lib/plugins/ResourceHintsPlugin.js +17 -17
  38. package/lib/plugins/RtlSplitPlugin/RtlCssPlugin.js +24 -16
  39. package/lib/plugins/RtlSplitPlugin/RtrSplit.md +30 -30
  40. package/lib/plugins/ServiceWorkerPlugin.js +9 -9
  41. package/lib/plugins/TPHashMappingPlugin.js +4 -4
  42. package/lib/postcss-plugins/{ExcludeRTLPlugin.js → ExcludePlugin.js} +1 -1
  43. package/lib/postcss-plugins/RTLSplitPlugin.js +10 -10
  44. package/lib/postcss-plugins/__test__/test1Input.css +38 -38
  45. package/lib/postcss-plugins/__test__/test1Output.css +38 -38
  46. package/lib/postcss-plugins/hoverActivePlugin.js +4 -4
  47. package/lib/postcss-plugins/variableModifier.js +243 -0
  48. package/lib/schemas/index.js +20 -8
  49. package/lib/sh/pre-commit.sh +34 -34
  50. package/lib/sh/reportPublish.sh +45 -45
  51. package/lib/utils/buildstats.html +148 -148
  52. package/lib/utils/resultSchema.json +73 -73
  53. package/npm8.md +9 -9
  54. package/package.json +148 -148
  55. package/postpublish.js +6 -6
  56. package/templates/app/.eslintrc.js +140 -140
  57. package/templates/app/README.md +12 -12
  58. package/templates/app/app/index.html +24 -24
  59. package/templates/app/app/properties/ApplicationResources_en_US.properties +1 -1
  60. package/templates/app/app/properties/i18nkeys.json +3 -3
  61. package/templates/app/docs/all.html +69 -69
  62. package/templates/app/mockapi/index.js +18 -18
  63. package/templates/app/package.json +37 -37
  64. package/templates/app/src/actions/SampleActions/index.js +37 -37
  65. package/templates/app/src/actions/index.js +65 -65
  66. package/templates/app/src/appUrls.js +19 -19
  67. package/templates/app/src/components/Alert/Alert.js +134 -134
  68. package/templates/app/src/components/Alert/Alert.module.css +79 -79
  69. package/templates/app/src/components/FreezeLayer/FreezeLayer.css +37 -37
  70. package/templates/app/src/components/FreezeLayer/FreezeLayer.js +84 -84
  71. package/templates/app/src/components/Sample/Sample.module.css +11 -11
  72. package/templates/app/src/components/Sample/SampleList.js +61 -61
  73. package/templates/app/src/components/Slider/Slider.css +41 -41
  74. package/templates/app/src/components/Slider/Slider.js +55 -55
  75. package/templates/app/src/containers/AlertContainer/index.js +15 -15
  76. package/templates/app/src/containers/AppContainer/index.js +96 -96
  77. package/templates/app/src/containers/AppContainer/index.module.css +27 -27
  78. package/templates/app/src/containers/CustomMatch/index.js +65 -65
  79. package/templates/app/src/containers/DevTools/index.js +10 -10
  80. package/templates/app/src/containers/Header/index.js +67 -67
  81. package/templates/app/src/containers/Header/index.module.css +43 -43
  82. package/templates/app/src/containers/Redirect/index.js +63 -63
  83. package/templates/app/src/containers/Redirector/index.js +47 -47
  84. package/templates/app/src/containers/SampleListContainer/ListContainer.js +42 -42
  85. package/templates/app/src/containers/SampleListContainer/ListContainer.module.css +3 -3
  86. package/templates/app/src/historyChange.js +5 -5
  87. package/templates/app/src/index.html +10 -10
  88. package/templates/app/src/index.js +24 -24
  89. package/templates/app/src/middleware/PromiseMiddleware.js +59 -59
  90. package/templates/app/src/reducers/alertData.js +11 -11
  91. package/templates/app/src/reducers/index.js +6 -6
  92. package/templates/app/src/reducers/samples.js +19 -19
  93. package/templates/app/src/store/configureStore.dev.js +51 -51
  94. package/templates/app/src/store/configureStore.js +5 -5
  95. package/templates/app/src/store/configureStore.prod.js +26 -26
  96. package/templates/app/src/util/Common.js +5 -5
  97. package/templates/app/src/util/RequestAPI.js +132 -132
  98. package/templates/docs/all.html +249 -249
  99. package/templates/docs/component.html +178 -178
  100. package/templates/docs/components.html +221 -221
  101. package/templates/docs/css/b.min.css +6 -6
  102. package/templates/docs/css/component.css +42 -42
  103. package/templates/docs/css/componentTest.css +6 -6
  104. package/templates/docs/css/hopscotch.css +585 -585
  105. package/templates/docs/css/style.css +1022 -1022
  106. package/templates/docs/impactReportTemplate.html +154 -154
  107. package/templates/docs/index.html +1493 -1493
  108. package/templates/docs/js/active-line.js +72 -72
  109. package/templates/docs/js/b.min.js +7 -7
  110. package/templates/docs/js/codemirror.js +9680 -9680
  111. package/templates/docs/js/designTokens.js +334 -334
  112. package/templates/docs/js/j.min.js +4 -4
  113. package/templates/docs/js/javascript.js +874 -874
  114. package/templates/docs/js/matchbrackets.js +145 -145
package/files/eslintrc.js CHANGED
@@ -1,62 +1,62 @@
1
- const [off, , error] = ['off', 'warn', 'error'];
2
-
3
- module.exports = {
4
- env: {
5
- browser: true,
6
- es2021: true,
7
- },
8
- extends: [
9
- 'plugin:react/recommended',
10
- 'plugin:react-hooks/recommended',
11
- 'airbnb',
12
- 'prettier',
13
- ],
14
- parserOptions: {
15
- ecmaFeatures: {
16
- jsx: true,
17
- },
18
- ecmaVersion: 12,
19
- sourceType: 'module',
20
- },
21
- plugins: [
22
- 'react',
23
- 'css-modules',
24
- '@zohodesk/zsecurity',
25
- '@zohodesk/react-performance',
26
- ],
27
- rules: {
28
- // Internal Rules
29
- '@zohodesk/react-performance/no-ref-mapstatetoprops': error,
30
- '@zohodesk/zsecurity/no-unsecure-html': error,
31
- '@zohodesk/zsecurity/no-protocol-check': error,
32
-
33
- // CSS Module Rules
34
- 'css-modules/no-unused-class': [error, { camelCase: true }],
35
- 'css-modules/no-undef-class': [error, { camelCase: 'only' }],
36
-
37
- 'import/no-unresolved': off,
38
- 'import/no-extraneous-dependencies': off,
39
-
40
- // As redux used
41
- 'no-shadow': off, // As we import the action files and use the same name in getting from props built from connect.
42
- 'react/jsx-filename-extension': off,
43
-
44
- // As we don't follow
45
- 'react/require-default-props': off,
46
- 'react/jsx-props-no-spreading': off,
47
-
48
- // As we didn't update
49
- 'react/jsx-fragments': off,
50
-
51
- // Not needed
52
- 'no-plusplus': off,
53
- 'no-unused-expressions': [
54
- error,
55
- {
56
- allowShortCircuit: true,
57
- allowTernary: true,
58
- },
59
- ],
60
- 'react/jsx-no-target-blank': error,
61
- },
62
- };
1
+ const [off, , error] = ['off', 'warn', 'error'];
2
+
3
+ module.exports = {
4
+ env: {
5
+ browser: true,
6
+ es2021: true,
7
+ },
8
+ extends: [
9
+ 'plugin:react/recommended',
10
+ 'plugin:react-hooks/recommended',
11
+ 'airbnb',
12
+ 'prettier',
13
+ ],
14
+ parserOptions: {
15
+ ecmaFeatures: {
16
+ jsx: true,
17
+ },
18
+ ecmaVersion: 12,
19
+ sourceType: 'module',
20
+ },
21
+ plugins: [
22
+ 'react',
23
+ 'css-modules',
24
+ '@zohodesk/zsecurity',
25
+ '@zohodesk/react-performance',
26
+ ],
27
+ rules: {
28
+ // Internal Rules
29
+ '@zohodesk/react-performance/no-ref-mapstatetoprops': error,
30
+ '@zohodesk/zsecurity/no-unsecure-html': error,
31
+ '@zohodesk/zsecurity/no-protocol-check': error,
32
+
33
+ // CSS Module Rules
34
+ 'css-modules/no-unused-class': [error, { camelCase: true }],
35
+ 'css-modules/no-undef-class': [error, { camelCase: 'only' }],
36
+
37
+ 'import/no-unresolved': off,
38
+ 'import/no-extraneous-dependencies': off,
39
+
40
+ // As redux used
41
+ 'no-shadow': off, // As we import the action files and use the same name in getting from props built from connect.
42
+ 'react/jsx-filename-extension': off,
43
+
44
+ // As we don't follow
45
+ 'react/require-default-props': off,
46
+ 'react/jsx-props-no-spreading': off,
47
+
48
+ // As we didn't update
49
+ 'react/jsx-fragments': off,
50
+
51
+ // Not needed
52
+ 'no-plusplus': off,
53
+ 'no-unused-expressions': [
54
+ error,
55
+ {
56
+ allowShortCircuit: true,
57
+ allowTernary: true,
58
+ },
59
+ ],
60
+ 'react/jsx-no-target-blank': error,
61
+ },
62
+ };
@@ -1,3 +1,3 @@
1
- module.exports = {
2
- trailingComma: 'none',
3
- };
1
+ module.exports = {
2
+ trailingComma: 'none',
3
+ };
@@ -27,7 +27,9 @@ let commonConfig = {
27
27
  '^.+\\.css$': _path.default.resolve(__dirname, '..', 'jest', 'preProcessors', 'cssPreprocessor.js'),
28
28
  '^(?!.*\\.(js|jsx|css|json)$)': _path.default.resolve(__dirname, '..', 'jest', 'preProcessors', 'otherFilesPreprocessor.js')
29
29
  },
30
- moduleNameMapper: moduleNameMapper,
30
+ moduleNameMapper: { ...moduleNameMapper,
31
+ '\\.(css|less)$': 'identity-obj-proxy'
32
+ },
31
33
  transformIgnorePatterns: ['/node_modules/(?!(@zohodesk)/)'],
32
34
  // transformIgnorePatterns: ['/node_modules.*?.js$'],
33
35
  moduleFileExtensions: ['js'],
@@ -67,10 +67,10 @@ module.exports = {
67
67
  }],
68
68
  include: _path.default.join(appPath, 'src')
69
69
  }
70
- /*,
71
- {
72
- test: /\.css$/,
73
- use: [MiniCssExtractPlugin.loader, 'css-loader']
70
+ /*,
71
+ {
72
+ test: /\.css$/,
73
+ use: [MiniCssExtractPlugin.loader, 'css-loader']
74
74
  }*/
75
75
  , {
76
76
  test: /(\.module)?\.css$/,
@@ -24,10 +24,8 @@ let {
24
24
  context,
25
25
  server,
26
26
  outputFolder,
27
- rtlExclude,
28
- combinerMq,
29
- hasRTL,
30
- hoverActive,
27
+ plugins,
28
+ exclude,
31
29
  cssUniqueness,
32
30
  seperateCssModules,
33
31
  changeRuntimeChunkChar,
@@ -100,10 +98,10 @@ module.exports = {
100
98
  }, seperateCssModules ? {
101
99
  test: /\.css$/,
102
100
  exclude: /\.module\.css$/,
103
- use: (0, _loaderUtils.getCSSLoaders)(hasRTL, rtlExclude, combinerMq, hoverActive, '[local]', false, null)
101
+ use: (0, _loaderUtils.getCSSLoaders)(plugins, exclude, '[local]', false, null)
104
102
  } : null, {
105
103
  test: seperateCssModules ? /\.module\.css$/ : /(\.module)?\.css$/,
106
- use: (0, _loaderUtils.getCSSLoaders)(hasRTL, combinerMq, rtlExclude, hoverActive, null, cssUniqueness, selectorReplace, cssHashSelectors, classNamePrefix)
104
+ use: (0, _loaderUtils.getCSSLoaders)(plugins, exclude, null, cssUniqueness, selectorReplace, cssHashSelectors, classNamePrefix)
107
105
  }, (0, _configsAssetsLoaders.configImageLoader)(nameTemplate), (0, _configsAssetsLoaders.configFontLoader)(nameTemplate), (0, _configsAssetsLoaders.configSVGLoader)(nameTemplate), (0, _configsAssetsLoaders.configVideoLoader)(nameTemplate), (0, _configsAssetsLoaders.configAudioLoader)(nameTemplate), {
108
106
  test: /\.tmpl$/,
109
107
  use: [{
@@ -22,10 +22,8 @@ let {
22
22
  disableES5Transpile,
23
23
  enableChunkHash,
24
24
  cssUniqueness,
25
- combinerMq,
26
- hasRTL,
27
- hoverActive,
28
- rtlExclude,
25
+ plugins,
26
+ exclude,
29
27
  cssHashSelectors,
30
28
  classNamePrefix
31
29
  },
@@ -75,7 +73,7 @@ module.exports = isSSTest => ({
75
73
  exclude: /node_modules/
76
74
  }, {
77
75
  test: /(\.module)?\.css$/,
78
- use: (0, _loaderUtils.getCSSLoaders)(hasRTL, combinerMq, rtlExclude, hoverActive, false, cssUniqueness, null, cssHashSelectors, classNamePrefix)
76
+ use: (0, _loaderUtils.getCSSLoaders)(plugins, exclude, false, cssUniqueness, null, cssHashSelectors, classNamePrefix)
79
77
  }, (0, _configsAssetsLoaders.configImageLoader)(nameTemplate), (0, _configsAssetsLoaders.configFontLoader)(nameTemplate), (0, _configsAssetsLoaders.configSVGLoader)(nameTemplate), (0, _configsAssetsLoaders.configAudioLoader)(nameTemplate), (0, _configsAssetsLoaders.configVideoLoader)(nameTemplate), {
80
78
  test: /\.html$/,
81
79
  use: {
@@ -17,10 +17,8 @@ let {
17
17
  docs: {
18
18
  componentFolder,
19
19
  cssUniqueness,
20
- hasRTL,
21
- rtlExclude,
22
- hoverActive,
23
- combinerMq,
20
+ plugins,
21
+ exclude,
24
22
  cssHashSelectors,
25
23
  enableChunkHash,
26
24
  classNamePrefix
@@ -70,7 +68,7 @@ module.exports = {
70
68
  exclude: /node_modules/
71
69
  }, {
72
70
  test: /(\.module)?\.css$/,
73
- use: (0, _loaderUtils.getCSSLoaders)(hasRTL, rtlExclude, combinerMq, hoverActive, false, cssUniqueness, null, cssHashSelectors, classNamePrefix)
71
+ use: (0, _loaderUtils.getCSSLoaders)(plugins, exclude, false, cssUniqueness, null, cssHashSelectors, classNamePrefix)
74
72
  }, (0, _configsAssetsLoaders.configImageLoader)(nameTemplate), (0, _configsAssetsLoaders.configFontLoader)(nameTemplate), (0, _configsAssetsLoaders.configSVGLoader)(nameTemplate), (0, _configsAssetsLoaders.configAudioLoader)(nameTemplate), (0, _configsAssetsLoaders.configVideoLoader)(nameTemplate), {
75
73
  test: /\.html$/,
76
74
  use: {
@@ -29,10 +29,8 @@ let {
29
29
  removeAttribute,
30
30
  enableSMap,
31
31
  server,
32
- combinerMq,
33
- hasRTL,
34
- rtlExclude,
35
- hoverActive,
32
+ plugins,
33
+ exclude,
36
34
  cssUniqueness,
37
35
  server: {
38
36
  mode
@@ -148,10 +146,10 @@ module.exports = {
148
146
  }, seperateCssModules ? {
149
147
  test: /\.css$/,
150
148
  exclude: /\.module\.css$/,
151
- use: (0, _loaderUtils.getCSSLoaders)(hasRTL, rtlExclude, hoverActive, combinerMq, '[local]', false, null)
149
+ use: (0, _loaderUtils.getCSSLoaders)(plugins, exclude, '[local]', false, null)
152
150
  } : null, {
153
151
  test: seperateCssModules ? /\.module\.css$/ : /\.css$/,
154
- use: (0, _loaderUtils.getCSSLoaders)(hasRTL, combinerMq, rtlExclude, hoverActive, false, cssUniqueness, selectorReplace, cssHashSelectors, classNamePrefix)
152
+ use: (0, _loaderUtils.getCSSLoaders)(plugins, exclude, false, cssUniqueness, selectorReplace, cssHashSelectors, classNamePrefix)
155
153
  }, {
156
154
  test: /\.jpe?g$|\.gif$|\.png$/,
157
155
  use: [{
@@ -24,8 +24,6 @@ module.exports = {
24
24
 
25
25
  let jsonMap = _fs.default.readFileSync(`jsonFile_test_${count}.json`, 'UTF-8');
26
26
 
27
- _fs.default.unlinkSync(`jsonFile_test_${count}.json`);
28
-
29
27
  return `module.exports =${jsonMap}`;
30
28
  }
31
29
  };
@@ -79,39 +79,39 @@ function createNameTemplate(enableChunkHash) {
79
79
  const ext = `${enableChunkHash ? '.[hash:20]' : ''}.[ext]`;
80
80
  return `[name]${ext}`;
81
81
  }
82
- /*
83
- export function createImageAndFontsAndSVGLoaders(enableChunkHash) {
84
- const nameTemplate = createNameTemplate(enableChunkHash);
85
- return [
86
- configImageLoader(nameTemplate),
87
- configFontLoader(nameTemplate),
88
- configSVGLoader(nameTemplate),
89
- configAudioLoader(nameTemplate)
90
- ];
91
- }
82
+ /*
83
+ export function createImageAndFontsAndSVGLoaders(enableChunkHash) {
84
+ const nameTemplate = createNameTemplate(enableChunkHash);
85
+ return [
86
+ configImageLoader(nameTemplate),
87
+ configFontLoader(nameTemplate),
88
+ configSVGLoader(nameTemplate),
89
+ configAudioLoader(nameTemplate)
90
+ ];
91
+ }
92
92
  */
93
93
 
94
- /*
95
- export function createLoaderOptionObject(
96
- loaderName,
97
- nameTemplate,
98
- fallback,
99
- limit = 1000
100
- ) {
101
- return {
102
- loader: loaderName,
103
- options: {
104
- limit,
105
- name: nameTemplate,
106
- fallback
107
- }
108
- };
109
- }
110
-
111
- function configLoaderObject(filter, loaderAndOptions) {
112
- return {
113
- test: filter,
114
- use: loaderAndOptions
115
- };
116
- }
94
+ /*
95
+ export function createLoaderOptionObject(
96
+ loaderName,
97
+ nameTemplate,
98
+ fallback,
99
+ limit = 1000
100
+ ) {
101
+ return {
102
+ loader: loaderName,
103
+ options: {
104
+ limit,
105
+ name: nameTemplate,
106
+ fallback
107
+ }
108
+ };
109
+ }
110
+
111
+ function configLoaderObject(filter, loaderAndOptions) {
112
+ return {
113
+ test: filter,
114
+ use: loaderAndOptions
115
+ };
116
+ }
117
117
  */
@@ -16,7 +16,11 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
16
16
  let options = (0, _utils.getOptions)();
17
17
  let isWin = process.platform === 'win32';
18
18
 
19
- let getCSSLoaders = (hasRTL, combinerMq, rtlExclude, hoverActive, classNameBlob, cssUniqueness, selectorReplace, cssHashSelectors, classNamePrefix) => {
19
+ let getCSSLoaders = (plugins, exclude, classNameBlob, cssUniqueness, selectorReplace, cssHashSelectors, classNamePrefix) => {
20
+ // console.log('plugins:')
21
+ // console.log(plugins)
22
+ // console.log('exclude:')
23
+ // console.log(exclude)
20
24
  const {
21
25
  devCssFileBountry
22
26
  } = options.app;
@@ -26,7 +30,14 @@ let getCSSLoaders = (hasRTL, combinerMq, rtlExclude, hoverActive, classNameBlob,
26
30
  const {
27
31
  cssSelectorZipPath
28
32
  } = options.impactService;
29
- let rtlExcludeLocal = isWin ? rtlExclude.map(r => r.replace(/\//g, '\\')) : rtlExclude;
33
+
34
+ function windowsModification(array) {
35
+ return isWin ? array.map(r => r.replace(/\//g, '\\')) : array;
36
+ }
37
+
38
+ let rtlExcludeLocal = windowsModification(exclude.rtl);
39
+ let hoverActiveExcludeLocal = windowsModification(exclude.hoverActive);
40
+ let combinerMediaQueryExcludeLocal = windowsModification(exclude.combinerMediaQuery);
30
41
  let cssLoaderOptions = {
31
42
  // importLoaders: hasRTL||hoverActive ? 1 : 0,
32
43
  importLoaders: 1,
@@ -40,7 +51,7 @@ let getCSSLoaders = (hasRTL, combinerMq, rtlExclude, hoverActive, classNameBlob,
40
51
  cssLoaderOptions.modules.getLocalIdent = (0, _cssClassNameGenerate.default)(cssUniqueness, cssHashSelectors, classNamePrefix);
41
52
  }
42
53
 
43
- const postcssPlugins = [valueReplacer && require('../postcss-plugins/ValueReplacer')(valueReplacer), selectorReplace && require('postcss-selector-replace')(selectorReplace), hasRTL && require('../postcss-plugins/ExcludeRTLPlugin')({
54
+ const postcssPlugins = [valueReplacer && require('../postcss-plugins/ValueReplacer')(valueReplacer), selectorReplace && require('postcss-selector-replace')(selectorReplace), plugins.hasRTL && require('../postcss-plugins/ExcludePlugin')({
44
55
  ignore: rtlExcludeLocal,
45
56
  plugins: [require('@zohodesk/postcss-rtl')({
46
57
  addPrefixToSelector: function addPrefixToSelector(selector, prefix) {
@@ -51,8 +62,14 @@ let getCSSLoaders = (hasRTL, combinerMq, rtlExclude, hoverActive, classNameBlob,
51
62
  return `${prefix} ${selector}`; // Make selectors like [dir=rtl] > .selector
52
63
  }
53
64
  })]
54
- }), // require('postcss-import')(),
55
- combinerMq && require('postcss-combine-media-query')(), hoverActive && require('../postcss-plugins/hoverActivePlugin')()].filter(Boolean);
65
+ }), plugins.combinerMediaQuery && require('../postcss-plugins/ExcludePlugin')({
66
+ ignore: combinerMediaQueryExcludeLocal,
67
+ plugins: [require('postcss-combine-media-query')]
68
+ }), plugins.hoverActive && require('../postcss-plugins/ExcludePlugin')({
69
+ ignore: hoverActiveExcludeLocal,
70
+ plugins: [require('../postcss-plugins/hoverActivePlugin')]
71
+ }) // require('../postcss-plugins/variableModifier')()
72
+ ].filter(Boolean);
56
73
  return [cssSelectorZipPath && {
57
74
  loader: require.resolve('../loaders/selectorMappingLoader')
58
75
  }, {
@@ -16,7 +16,7 @@ var _SingleEntryPlugin = _interopRequireDefault(require("webpack/lib/SingleEntry
16
16
 
17
17
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
18
18
 
19
- /* import WebWorkerTemplatePlugin from 'webpack/lib/webworker/WebWorkerTemplatePlugin';
19
+ /* import WebWorkerTemplatePlugin from 'webpack/lib/webworker/WebWorkerTemplatePlugin';
20
20
  import ExternalsPlugin from 'webpack/lib/ExternalsPlugin'; */
21
21
  const schema = {
22
22
  'type': 'object',
@@ -80,14 +80,14 @@ function pitch(request) {
80
80
  globalObject: 'self'
81
81
  };
82
82
  workerContext.compiler = this._compilation.createChildCompiler(`worker-loader ${request}`, workerContext.options);
83
- /*
84
- new WebWorkerTemplatePlugin().apply(workerContext.compiler);
85
-
86
- if (compilerOptions.externals) {
87
- new ExternalsPlugin(
88
- getExternalsType(compilerOptions),
89
- compilerOptions.externals
90
- ).apply(workerContext.compiler);
83
+ /*
84
+ new WebWorkerTemplatePlugin().apply(workerContext.compiler);
85
+
86
+ if (compilerOptions.externals) {
87
+ new ExternalsPlugin(
88
+ getExternalsType(compilerOptions),
89
+ compilerOptions.externals
90
+ ).apply(workerContext.compiler);
91
91
  } */
92
92
 
93
93
  new _SingleEntryPlugin.default(this.context, `!!${request}`, _path.default.parse(this.resourcePath).name).apply(workerContext.compiler);
@@ -103,11 +103,11 @@ let getDevPlugins = (options, publicPath) => {
103
103
  }
104
104
 
105
105
  const i18nManifestFileName = 'i18n-manifest.json';
106
- /**
107
- * NOTE:
108
- * this file name ext .i18n.js added
109
- * Because, in service worker they maintain cache as file name based
110
- * So, to make differce we added .i18n.js ext.
106
+ /**
107
+ * NOTE:
108
+ * this file name ext .i18n.js added
109
+ * Because, in service worker they maintain cache as file name based
110
+ * So, to make differce we added .i18n.js ext.
111
111
  */
112
112
 
113
113
  const i18nFileNameTemplate = 'i18n-chunk/[locale]/[name].i18n.js';
@@ -108,11 +108,11 @@ let getProdPlugins = (options, publicPath = '') => {
108
108
  }
109
109
 
110
110
  const i18nManifestFileName = 'i18n-manifest.json';
111
- /**
112
- * NOTE:
113
- * this file name ext .i18n.js added
114
- * Because, in service worker they maintain cache as file name based
115
- * So, to make differce we added .i18n.js ext.
111
+ /**
112
+ * NOTE:
113
+ * this file name ext .i18n.js added
114
+ * Because, in service worker they maintain cache as file name based
115
+ * So, to make differce we added .i18n.js ext.
116
116
  */
117
117
 
118
118
  const i18nFileNameTemplate = 'i18n-chunk/[locale]/[name].[chunkhash].i18n.js';
@@ -1,6 +1,6 @@
1
- # EFC Plugin
2
-
3
- In EFC plugin we are create sdk file for efc related purpose
4
-
5
-
6
- # document will be soon
1
+ # EFC Plugin
2
+
3
+ In EFC plugin we are create sdk file for efc related purpose
4
+
5
+
6
+ # document will be soon
@@ -116,10 +116,10 @@ class I18NInjectIntoIndexPlugin {
116
116
  i18nObj = i18nFiles.reduce((res, next) => {
117
117
  let fileName = next.replace(`i18n${_path.default.sep}`, '');
118
118
  let splittedFileName = fileName.split('.');
119
- /* if (this.isDevelopment) {
120
- res[splittedFileName[0]] = `${this.publicPath}/i18n/${fileName}`;
121
- } else {
122
- res[splittedFileName[0]] = fileName;
119
+ /* if (this.isDevelopment) {
120
+ res[splittedFileName[0]] = `${this.publicPath}/i18n/${fileName}`;
121
+ } else {
122
+ res[splittedFileName[0]] = fileName;
123
123
  } */
124
124
 
125
125
  res[splittedFileName[0]] = `${this.publicPath}/i18n/${fileName}`;
@@ -13,23 +13,23 @@ var _hashUtils = require("./utils/hashUtils");
13
13
 
14
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
15
 
16
- /**
17
- * this plugin for the download i18n files
18
- * So, if need to downoad i18n in browser this plugin handle that
19
- *
20
- *
21
- * this plugin works
22
- * how it works?
23
- * this plugin hook the requireEnsure method and we write logic for current compiled file download logic
24
- *
25
- * hinds:-
26
- * requireEnsure method was loader for all js chunk's ,
27
- * which means if we use dynamic import then this function will create script tag for that dynamic resource
28
- * so every dynamic js chunk will load by this function,
29
- * So we update this function with when dynamic jschunk call the nour code also execute
30
- *
31
- * some thing missing in this definetion
32
- *
16
+ /**
17
+ * this plugin for the download i18n files
18
+ * So, if need to downoad i18n in browser this plugin handle that
19
+ *
20
+ *
21
+ * this plugin works
22
+ * how it works?
23
+ * this plugin hook the requireEnsure method and we write logic for current compiled file download logic
24
+ *
25
+ * hinds:-
26
+ * requireEnsure method was loader for all js chunk's ,
27
+ * which means if we use dynamic import then this function will create script tag for that dynamic resource
28
+ * so every dynamic js chunk will load by this function,
29
+ * So we update this function with when dynamic jschunk call the nour code also execute
30
+ *
31
+ * some thing missing in this definetion
32
+ *
33
33
  */
34
34
  // import { REGEXP_HASH, REGEXP_CHUNKHASH } from './utils/hashUtils';
35
35
  const pluginName = 'DownloadLogicOfI18n'; // const pluginName = 'i18n-plugin';
@@ -126,20 +126,20 @@ class I18nDownlodLogic {
126
126
  return _webpack.Template.asString([source, '', '// object to store loaded I18N chunks', 'var installedI18nChunks = {', _webpack.Template.indent(mainChunk.ids.map(id => `${JSON.stringify(id)}: 0`).join(',\n')), '};']);
127
127
  });
128
128
  mainTemplate.hooks.requireEnsure.tap(pluginName, (source, mainChunk, hash) => {
129
- /**
130
- * for Information this is tapped in mainTemplate ,
131
- * So this hooks argument chunk is main chunk means entry chunk mostly.
132
- * if any chunk has i18n then we must write our download i18n logic,
129
+ /**
130
+ * for Information this is tapped in mainTemplate ,
131
+ * So this hooks argument chunk is main chunk means entry chunk mostly.
132
+ * if any chunk has i18n then we must write our download i18n logic,
133
133
  */
134
134
  const chunkMap = this.getI18nChunkObject(mainChunk);
135
135
 
136
136
  if (!Object.keys(chunkMap).length) {
137
137
  return source;
138
138
  }
139
- /**
140
- * chunkMaps has
141
- * @property {Object} hash [it has key as chunk id and value as chunkHash ]
142
- * @property {Object} name [it has key as chunk id and value as chunk name ]
139
+ /**
140
+ * chunkMaps has
141
+ * @property {Object} hash [it has key as chunk id and value as chunkHash ]
142
+ * @property {Object} name [it has key as chunk id and value as chunk name ]
143
143
  */
144
144
 
145
145
 
@@ -176,22 +176,22 @@ class I18nDownlodLogic {
176
176
  },
177
177
  contentHashType: MODULE_TYPE
178
178
  });
179
- /** IDEA:
180
- * as my suggestion ignore this `jsop` approch,
181
- * Because json parse is faster then js parse.
182
- * my suggestion is make ajax or fetch request
179
+ /** IDEA:
180
+ * as my suggestion ignore this `jsop` approch,
181
+ * Because json parse is faster then js parse.
182
+ * my suggestion is make ajax or fetch request
183
183
  */
184
184
 
185
185
  const buf = [];
186
- /*
187
- if (REGEXP_HASH.test(filenameTemplate)) {
188
- buf.push(
189
- `var hash = ${mainTemplate.renderCurrentHashCode(hash)};`
190
- );
191
- }
192
- if (REGEXP_CHUNKHASH.test(filenameTemplate)) {
193
- buf.push(`var chunkHashes = ${JSON.stringify(chunkMaps.hash)};`);
194
- }
186
+ /*
187
+ if (REGEXP_HASH.test(filenameTemplate)) {
188
+ buf.push(
189
+ `var hash = ${mainTemplate.renderCurrentHashCode(hash)};`
190
+ );
191
+ }
192
+ if (REGEXP_CHUNKHASH.test(filenameTemplate)) {
193
+ buf.push(`var chunkHashes = ${JSON.stringify(chunkMaps.hash)};`);
194
+ }
195
195
  */
196
196
 
197
197
  if ((0, _hashUtils.hasContentHash)(filenameTemplate)) {