@zohodesk/react-cli 0.0.1-exp.166.1 → 0.0.1-exp.168.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +51 -2
- package/bin/cli.js +6 -1
- package/cert/Tsicsezwild-22-23.crt +37 -0
- package/cert/Tsicsezwild-22-23.key +27 -0
- package/docs/DevStart.md +18 -0
- package/docs/InstallNode.md +28 -0
- package/lib/configs/webpack.dev.config.js +13 -17
- package/lib/configs/webpack.docs.config.js +13 -18
- package/lib/configs/webpack.impact.config.js +6 -14
- package/lib/configs/webpack.prod.config.js +8 -5
- package/lib/loaderUtils/configsAssetsLoaders.js +88 -0
- package/lib/loaderUtils/getCSSLoaders.js +5 -3
- package/lib/postcss-plugins/hoverActivePlugin.js +264 -0
- package/lib/postcss-plugins/keyframesPlugin.js +126 -0
- package/lib/schemas/index.js +24 -2
- package/lib/servers/{devBulid.js → devBuild.js} +7 -3
- package/lib/servers/httpsOptions.js +2 -3
- package/lib/servers/nowatchserver.js +2 -2
- package/lib/servers/server.js +11 -3
- package/lib/utils/repoClone.js +5 -2
- package/lib/utils/rtl.js +19 -2
- package/lib/utils/useExitCleanup.js +55 -0
- package/package.json +5 -1
- package/postpublish.js +6 -0
- package/DOTO.md +0 -13
- package/cert/cert.pem +0 -37
- package/cert/key.pem +0 -27
- package/cert/passphrase.pem +0 -1
- package/eslint/NOTES.md +0 -3
- package/eslint/a23.c +0 -16
- package/eslint/a28.c +0 -25
- package/eslint/a29.c +0 -25
- package/eslint/a30.c +0 -29
- package/eslint/a31.c +0 -23
- package/eslint/a35.c +0 -23
- package/eslint/a36.c +0 -18
- package/eslint/a37.c +0 -25
- package/eslint/a38.c +0 -28
- package/eslint/a39.c +0 -17
- package/eslint/a40.c +0 -32
- package/eslint/mockapi.html +0 -18
- package/eslint/mockapi.md +0 -5
package/README.md
CHANGED
@@ -2,6 +2,55 @@
|
|
2
2
|
|
3
3
|
A CLI tool for build modern web application and libraries
|
4
4
|
|
5
|
+
# 0.0.1-exp.168.2
|
6
|
+
|
7
|
+
Changes :
|
8
|
+
|
9
|
+
1. hoverActive case handled with postcss hover:hover media query and hover:none media query is added
|
10
|
+
2. flag for hoverActive used to add/remove postcss changes
|
11
|
+
|
12
|
+
# 0.0.1-beta.168
|
13
|
+
|
14
|
+
Changes:-
|
15
|
+
|
16
|
+
1. `enableChunkHash` option enabled for dev mode, use it as `react-cli.app.enableChunkHash` in `package.json`
|
17
|
+
2. `--enable_efc=true` option added to enable efc by terminal
|
18
|
+
3. unwanted pem files removed
|
19
|
+
|
20
|
+
# 0.0.1-beta.167
|
21
|
+
|
22
|
+
SSL certificate update
|
23
|
+
this version has same as `0.0.1-exp.166.1`, `0.0.1-exp.166.2` and below and some minor changes
|
24
|
+
Features:-
|
25
|
+
|
26
|
+
- `--shallow_clone` option to `react-cli clone` this option will be usefull for shallow cloning repos in build time we don't need commit messages it will be 2x fast this way
|
27
|
+
- Example `react-cli clone --clone_type=git --clone_url=https://some.url --shallow_clone`
|
28
|
+
- `cliRootPath` option added for npm workspace related path problems
|
29
|
+
- Usage `package.json` , "react-cli" => "cliRootPath" stright key
|
30
|
+
- `unstableDepsInverse` option added for use app need library first priority over react-cli packages
|
31
|
+
- Usage `package.json` , "react-cli" => "unstableDepsInverse" stright key
|
32
|
+
|
33
|
+
Issue Fix :-
|
34
|
+
|
35
|
+
- In devmode initial html not recived after second rebuild issue fix.
|
36
|
+
- typo fix `devBulid` to `devBuild`.
|
37
|
+
- `disableES5Transpile` option missed in docs now added.
|
38
|
+
- docs libAlias not work as app for example in app we always take `es` folder to build for treshaking and reasons,
|
39
|
+
But that option not enabled in docs. now it is enabled.
|
40
|
+
- In `react-cli devbuild` command options not working properly,
|
41
|
+
when above command run via terminal not via npm run script options not working
|
42
|
+
So we send that options to webpack then it works as expected.
|
43
|
+
this behaviour need to check across os and need to be cross check with other commends as well for now we only fixed this
|
44
|
+
|
45
|
+
# 0.0.1-exp.166.2
|
46
|
+
|
47
|
+
Changes:-
|
48
|
+
|
49
|
+
- `-w` option (watch option) added for `react-cli rtl`
|
50
|
+
- Example `react-cli rtl ./src ./lib -w`
|
51
|
+
<!-- need to handle `react-cli rtl` options correctly -->
|
52
|
+
- disableES5Transpile option libAlias added for docs
|
53
|
+
|
5
54
|
# 0.0.1-exp.166.1
|
6
55
|
|
7
56
|
Changes:-
|
@@ -17,7 +66,7 @@ this version has same as `# 0.0.1-exp.164.1`, `# 0.0.1-exp.164.2` and below and
|
|
17
66
|
|
18
67
|
# 0.0.1-beta.165
|
19
68
|
|
20
|
-
- `valueReplacer` option added in shemas for font name replace related issue handling, for more [details](
|
69
|
+
- `valueReplacer` option added in shemas for font name replace related issue handling, for more [details](https://zgit.csez.zohocorpin.com/zohodesk/react-cli/-/blob/2.0.0/docs/ValueReplacer.md)
|
21
70
|
- `valuereplacer` option added in react-cli it takes three
|
22
71
|
1. sourceDir
|
23
72
|
2. distDir
|
@@ -25,7 +74,7 @@ this version has same as `# 0.0.1-exp.164.1`, `# 0.0.1-exp.164.2` and below and
|
|
25
74
|
|
26
75
|
# 0.0.1-exp.164.1
|
27
76
|
|
28
|
-
- extra features in custom chunks reffer [this](
|
77
|
+
- extra features in custom chunks reffer [this](https://zgit.csez.zohocorpin.com/zohodesk/react-cli/-/blob/2.0.0/docs/CustomChunks.md)
|
29
78
|
|
30
79
|
# 0.0.1-exp.164.2
|
31
80
|
|
package/bin/cli.js
CHANGED
@@ -13,6 +13,7 @@ const options = getOptions();
|
|
13
13
|
|
14
14
|
const { esLint: esLintOptions } = options || {};
|
15
15
|
const { preprocess } = options;
|
16
|
+
let { cliRootPath } = options;
|
16
17
|
const {
|
17
18
|
ignoreFilePaths: esLintIgnorePaths,
|
18
19
|
fix: esLintFix,
|
@@ -28,8 +29,12 @@ const appPath = process.cwd();
|
|
28
29
|
|
29
30
|
const isNodeModuleUnderAppFolder = __dirname.indexOf(appPath) !== -1;
|
30
31
|
|
32
|
+
if (!cliRootPath) {
|
33
|
+
cliRootPath = path.join(__dirname, '..');
|
34
|
+
}
|
35
|
+
|
31
36
|
const _getCliPath = !isNodeModuleUnderAppFolder
|
32
|
-
? libName => path.join(
|
37
|
+
? libName => path.join(cliRootPath, 'node_modules', '.bin', libName)
|
33
38
|
: libName => libName;
|
34
39
|
const suffixExt = isWindows ? '.cmd' : '';
|
35
40
|
|
@@ -0,0 +1,37 @@
|
|
1
|
+
-----BEGIN CERTIFICATE-----
|
2
|
+
MIIGXjCCBUagAwIBAgIRAMKJgToWlDYncIf54wIl/K4wDQYJKoZIhvcNAQELBQAw
|
3
|
+
gY8xCzAJBgNVBAYTAkdCMRswGQYDVQQIExJHcmVhdGVyIE1hbmNoZXN0ZXIxEDAO
|
4
|
+
BgNVBAcTB1NhbGZvcmQxGDAWBgNVBAoTD1NlY3RpZ28gTGltaXRlZDE3MDUGA1UE
|
5
|
+
AxMuU2VjdGlnbyBSU0EgRG9tYWluIFZhbGlkYXRpb24gU2VjdXJlIFNlcnZlciBD
|
6
|
+
QTAeFw0yMjA0MjAwMDAwMDBaFw0yMzA0MjAyMzU5NTlaMB4xHDAaBgNVBAMTE2Nz
|
7
|
+
ZXouem9ob2NvcnBpbi5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB
|
8
|
+
AQDaiXIoQmlYF7guFyGcjqmwJ4ksETK7R0QVoald3h0f8nkbqn29fg3MwvmMmnCV
|
9
|
+
27frm0wYaWK7/xIWb0IIxYqGG2OmOFC4lv/jrGa96EH3fHm0DVU+4gFOf+qdvjdt
|
10
|
+
vBdCxWw++dG8KJsbeFcJoF+az/Ei9vhjzgrKtHH62b9aw5i5lpVFbq9bZ0xr3xOx
|
11
|
+
brOpZDk/Af2svICTi15/G+YGM7X5DL7z2tjtX8KZ5cbLIjkQS7chtjmx61Tuwq+f
|
12
|
+
4zk0ge8w9hNkvcYrsueuT/FDyO8wbPphNPJBdGrjLnMT05vedAryYfl7LHe8ib3m
|
13
|
+
T6QQ0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JSUv2Hrv0GyJKXrPc
|
22
|
+
m20Il8uA5s1trAWDwQIOmqn58iBayQeqYIOAVETLgwrcp49d6OUjRgmGsheLIjkD
|
23
|
+
/wVLuBfeAwQ+TeGKNN21kNlzqj6R/sOktk/Q+7x9ETb6/cDgnpOa3fZMY5mxFt44
|
24
|
+
fZ7pAoGBAN8ep49qQWxChYfqu75d3dkCcbF6UeWS+mDZ1QDkiJ5hGlDWDAC7EUma
|
25
|
+
jf7c56wBydih+2XKFq2BWxyFcfzzxKJrNeMhGANi/yJ1QrECyrwVWnhP+OFfG5vR
|
26
|
+
O+PzUCwZGet0PHG6r6IuvpGMCdZDYCt+fZSvIRJtmvIrtZWGKQly
|
27
|
+
-----END RSA PRIVATE KEY-----
|
package/docs/DevStart.md
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
# DevServer Start
|
2
|
+
|
3
|
+
## command
|
4
|
+
|
5
|
+
> `react-cli start`
|
6
|
+
|
7
|
+
## Options
|
8
|
+
|
9
|
+
we have to typs of options command line arguments and package.json option specifying
|
10
|
+
|
11
|
+
### First package.json option specifying
|
12
|
+
|
13
|
+
1. `react-cli.app.context`
|
14
|
+
1. `react-cli.app.server`
|
15
|
+
1. `react-cli.app.server`
|
16
|
+
1. `react-cli.app.server`
|
17
|
+
1. `react-cli.app.server`
|
18
|
+
1. `react-cli.app.server`
|
@@ -0,0 +1,28 @@
|
|
1
|
+
### Step 1: Update APT index
|
2
|
+
|
3
|
+
Run the apt update command on your Ubuntu Linux to update package repository contents database.
|
4
|
+
|
5
|
+
> sudo apt update
|
6
|
+
|
7
|
+
### Step 2: Install Node.js 14 on Ubuntu 22.04|20.04|18.04
|
8
|
+
|
9
|
+
After system update, install Node.js 14 on Ubuntu 22.04|20.04|18.04 by first installing the required repository.
|
10
|
+
|
11
|
+
> curl -sL https://deb.nodesource.com/setup_14.x | sudo bash -
|
12
|
+
|
13
|
+
The script above will create apt sources list file for the NodeSource Node.js 14.x repo:
|
14
|
+
|
15
|
+
> \# Ubuntu 20.04 example
|
16
|
+
>
|
17
|
+
> $ cat /etc/apt/sources.list.d/nodesource.list
|
18
|
+
> deb https://deb.nodesource.com/node_14.x focal main
|
19
|
+
> deb-src https://deb.nodesource.com/node_14.x focal main
|
20
|
+
|
21
|
+
Once the repository is added, you can begin the installation of Node.js 14 on Ubuntu Linux:
|
22
|
+
|
23
|
+
> sudo apt -y install nodejs
|
24
|
+
|
25
|
+
Verify the version of Node.js installed.
|
26
|
+
|
27
|
+
> $ node -v
|
28
|
+
> v14.17.5
|
@@ -12,20 +12,27 @@ var _loaderUtils = require("../loaderUtils");
|
|
12
12
|
|
13
13
|
var _libAlias = require("./libAlias");
|
14
14
|
|
15
|
+
var _configsAssetsLoaders = require("../loaderUtils/configsAssetsLoaders");
|
16
|
+
|
15
17
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
16
18
|
|
17
19
|
let options = (0, _utils.getOptions)();
|
18
20
|
let {
|
21
|
+
unstableDepsInverse,
|
19
22
|
app: {
|
20
23
|
folder,
|
21
24
|
context,
|
22
25
|
server,
|
23
26
|
outputFolder,
|
24
27
|
rtlExclude,
|
28
|
+
combinerMq,
|
25
29
|
hasRTL,
|
30
|
+
hoverActive,
|
26
31
|
cssUniqueness,
|
27
32
|
seperateCssModules,
|
28
33
|
changeRuntimeChunkChar,
|
34
|
+
// we are going to use this for fonts file name collide in issue in devmode
|
35
|
+
enableChunkHash,
|
29
36
|
cssHashSelectors,
|
30
37
|
classNamePrefix,
|
31
38
|
selectorReplace,
|
@@ -48,6 +55,7 @@ let output = {
|
|
48
55
|
publicPath: `${[serverUrl, contextURL].filter(a => a).join('/')}/`,
|
49
56
|
jsonpFunction: `${context}Jsonp`
|
50
57
|
};
|
58
|
+
const nameTemplate = (0, _configsAssetsLoaders.createNameTemplate)(enableChunkHash);
|
51
59
|
|
52
60
|
if (crossorigin) {
|
53
61
|
output.crossOriginLoading = 'anonymous';
|
@@ -92,23 +100,11 @@ module.exports = {
|
|
92
100
|
}, seperateCssModules ? {
|
93
101
|
test: /\.css$/,
|
94
102
|
exclude: /\.module\.css$/,
|
95
|
-
use: (0, _loaderUtils.getCSSLoaders)(hasRTL, rtlExclude, '[local]', false, null)
|
103
|
+
use: (0, _loaderUtils.getCSSLoaders)(hasRTL, rtlExclude, combinerMq, hoverActive, '[local]', false, null)
|
96
104
|
} : null, {
|
97
105
|
test: seperateCssModules ? /\.module\.css$/ : /(\.module)?\.css$/,
|
98
|
-
use: (0, _loaderUtils.getCSSLoaders)(hasRTL, rtlExclude, null, cssUniqueness, selectorReplace, cssHashSelectors, classNamePrefix)
|
99
|
-
}, {
|
100
|
-
test: /\.jpe?g$|\.gif$|\.png$/,
|
101
|
-
use: ['url-loader?limit=1000&name=./images/[name].[ext]']
|
102
|
-
}, {
|
103
|
-
test: /\.woff2|\.woff$|\.ttf$|\.eot$/,
|
104
|
-
use: ['url-loader?limit=1000&name=./fonts/[name].[ext]']
|
105
|
-
}, {
|
106
|
-
test: /\.svg$/,
|
107
|
-
use: ['url-loader?limit=1&name=./fonts/[name].[ext]']
|
108
|
-
}, {
|
109
|
-
test: /\.ogg$/,
|
110
|
-
use: ['file-loader?name=./fonts/[name].[ext]']
|
111
|
-
}, {
|
106
|
+
use: (0, _loaderUtils.getCSSLoaders)(hasRTL, combinerMq, rtlExclude, hoverActive, null, cssUniqueness, selectorReplace, cssHashSelectors, classNamePrefix)
|
107
|
+
}, (0, _configsAssetsLoaders.configImageLoader)(nameTemplate), (0, _configsAssetsLoaders.configFontLoader)(nameTemplate), (0, _configsAssetsLoaders.configSVGLoader)(nameTemplate), (0, _configsAssetsLoaders.configAudioLoader)(nameTemplate), {
|
112
108
|
test: /\.tmpl$/,
|
113
109
|
use: [{
|
114
110
|
loader: 'html-loader',
|
@@ -131,10 +127,10 @@ module.exports = {
|
|
131
127
|
ZC: '$ZC'
|
132
128
|
},
|
133
129
|
resolve: {
|
134
|
-
modules: [_path.default.resolve(__dirname, '..', '..', 'node_modules'), 'node_modules'],
|
130
|
+
modules: unstableDepsInverse ? ['node_modules', _path.default.resolve(__dirname, '..', '..', 'node_modules')] : [_path.default.resolve(__dirname, '..', '..', 'node_modules'), 'node_modules'],
|
135
131
|
alias: disableES5Transpile ? _libAlias.libAlias : {}
|
136
132
|
},
|
137
133
|
resolveLoader: {
|
138
|
-
modules: [_path.default.resolve(__dirname, '..', '..', 'node_modules'), 'node_modules']
|
134
|
+
modules: unstableDepsInverse ? ['node_modules', _path.default.resolve(__dirname, '..', '..', 'node_modules')] : [_path.default.resolve(__dirname, '..', '..', 'node_modules'), 'node_modules']
|
139
135
|
}
|
140
136
|
};
|
@@ -10,24 +10,31 @@ var _loaderUtils = require("../loaderUtils");
|
|
10
10
|
|
11
11
|
var _libAlias = require("./libAlias");
|
12
12
|
|
13
|
+
var _configsAssetsLoaders = require("../loaderUtils/configsAssetsLoaders");
|
14
|
+
|
13
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
14
16
|
|
15
17
|
let options = (0, _utils.getOptions)();
|
16
18
|
let {
|
19
|
+
unstableDepsInverse,
|
17
20
|
docs: {
|
18
21
|
componentFolder,
|
22
|
+
disableES5Transpile,
|
23
|
+
enableChunkHash,
|
19
24
|
cssUniqueness,
|
25
|
+
combinerMq,
|
20
26
|
hasRTL,
|
27
|
+
hoverActive,
|
21
28
|
rtlExclude,
|
22
29
|
cssHashSelectors,
|
23
30
|
classNamePrefix
|
24
31
|
},
|
25
32
|
app: {
|
26
|
-
folder
|
27
|
-
disableES5Transpile
|
33
|
+
folder
|
28
34
|
}
|
29
35
|
} = options;
|
30
36
|
let appPath = process.cwd();
|
37
|
+
const nameTemplate = (0, _configsAssetsLoaders.createNameTemplate)(enableChunkHash);
|
31
38
|
|
32
39
|
module.exports = isSSTest => ({
|
33
40
|
entry: {
|
@@ -68,17 +75,8 @@ module.exports = isSSTest => ({
|
|
68
75
|
exclude: /node_modules/
|
69
76
|
}, {
|
70
77
|
test: /(\.module)?\.css$/,
|
71
|
-
use: (0, _loaderUtils.getCSSLoaders)(hasRTL, rtlExclude, false, cssUniqueness, null, cssHashSelectors, classNamePrefix)
|
72
|
-
}, {
|
73
|
-
test: /\.jpe?g$|\.gif$|\.png$/,
|
74
|
-
use: ['url-loader?limit=1000&name=./images/[name].[ext]']
|
75
|
-
}, {
|
76
|
-
test: /\.woff2|\.woff$|\.ttf$|\.eot$/,
|
77
|
-
use: ['url-loader?limit=1000&name=./fonts/[name].[ext]']
|
78
|
-
}, {
|
79
|
-
test: /\.svg$/,
|
80
|
-
use: ['url-loader?limit=1&name=./fonts/[name].[ext]']
|
81
|
-
}, {
|
78
|
+
use: (0, _loaderUtils.getCSSLoaders)(hasRTL, combinerMq, rtlExclude, hoverActive, false, cssUniqueness, null, cssHashSelectors, classNamePrefix)
|
79
|
+
}, (0, _configsAssetsLoaders.configImageLoader)(nameTemplate), (0, _configsAssetsLoaders.configFontLoader)(nameTemplate), (0, _configsAssetsLoaders.configSVGLoader)(nameTemplate), (0, _configsAssetsLoaders.configAudioLoader)(nameTemplate), {
|
82
80
|
test: /\.html$/,
|
83
81
|
use: {
|
84
82
|
loader: 'html-loader',
|
@@ -87,9 +85,6 @@ module.exports = isSSTest => ({
|
|
87
85
|
interpolate: 'require'
|
88
86
|
}
|
89
87
|
}
|
90
|
-
}, {
|
91
|
-
test: /\.ogg$/,
|
92
|
-
use: ['file-loader?name=./fonts/[name].[ext]']
|
93
88
|
}, {
|
94
89
|
test: /\.tmpl$/,
|
95
90
|
use: [{
|
@@ -110,10 +105,10 @@ module.exports = isSSTest => ({
|
|
110
105
|
ZC: '$ZC'
|
111
106
|
},
|
112
107
|
resolve: {
|
113
|
-
modules: [_path.default.resolve(__dirname, '..', '..', 'node_modules'), 'node_modules'],
|
108
|
+
modules: unstableDepsInverse ? ['node_modules', _path.default.resolve(__dirname, '..', '..', 'node_modules')] : [_path.default.resolve(__dirname, '..', '..', 'node_modules'), 'node_modules'],
|
114
109
|
alias: disableES5Transpile ? _libAlias.libAlias : {}
|
115
110
|
},
|
116
111
|
resolveLoader: {
|
117
|
-
modules: [_path.default.resolve(__dirname, '..', '..', 'node_modules'), 'node_modules']
|
112
|
+
modules: unstableDepsInverse ? ['node_modules', _path.default.resolve(__dirname, '..', '..', 'node_modules')] : [_path.default.resolve(__dirname, '..', '..', 'node_modules'), 'node_modules']
|
118
113
|
}
|
119
114
|
});
|
@@ -8,6 +8,8 @@ var _loaderUtils = require("../loaderUtils");
|
|
8
8
|
|
9
9
|
var _getLibraryImactPlugins = _interopRequireDefault(require("../pluginUtils/getLibraryImactPlugins"));
|
10
10
|
|
11
|
+
var _configsAssetsLoaders = require("../loaderUtils/configsAssetsLoaders");
|
12
|
+
|
11
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
12
14
|
|
13
15
|
let options = (0, _utils.getOptions)();
|
@@ -18,6 +20,7 @@ let {
|
|
18
20
|
hasRTL,
|
19
21
|
rtlExclude,
|
20
22
|
cssHashSelectors,
|
23
|
+
enableChunkHash,
|
21
24
|
classNamePrefix
|
22
25
|
},
|
23
26
|
app: {
|
@@ -25,6 +28,7 @@ let {
|
|
25
28
|
}
|
26
29
|
} = options;
|
27
30
|
let appPath = process.cwd();
|
31
|
+
const nameTemplate = (0, _configsAssetsLoaders.createNameTemplate)(enableChunkHash);
|
28
32
|
module.exports = {
|
29
33
|
entry: {
|
30
34
|
main: [_path.default.resolve(__dirname, '..', 'hooks', 'docsProptypeHook.js'), _path.default.join(appPath, componentFolder, 'index.js')],
|
@@ -64,17 +68,8 @@ module.exports = {
|
|
64
68
|
exclude: /node_modules/
|
65
69
|
}, {
|
66
70
|
test: /(\.module)?\.css$/,
|
67
|
-
use: (0, _loaderUtils.getCSSLoaders)(hasRTL, rtlExclude, false, cssUniqueness, null, cssHashSelectors, classNamePrefix)
|
68
|
-
}, {
|
69
|
-
test: /\.jpe?g$|\.gif$|\.png$/,
|
70
|
-
use: ['url-loader?limit=1000&name=./images/[name].[ext]']
|
71
|
-
}, {
|
72
|
-
test: /\.woff2|\.woff$|\.ttf$|\.eot$/,
|
73
|
-
use: ['url-loader?limit=1000&name=./fonts/[name].[ext]']
|
74
|
-
}, {
|
75
|
-
test: /\.svg$/,
|
76
|
-
use: ['url-loader?limit=1&name=./fonts/[name].[ext]']
|
77
|
-
}, {
|
71
|
+
use: (0, _loaderUtils.getCSSLoaders)(hasRTL, rtlExclude, combinerMq, hoverActive, false, cssUniqueness, null, cssHashSelectors, classNamePrefix)
|
72
|
+
}, (0, _configsAssetsLoaders.configImageLoader)(nameTemplate), (0, _configsAssetsLoaders.configFontLoader)(nameTemplate), (0, _configsAssetsLoaders.configSVGLoader)(nameTemplate), (0, _configsAssetsLoaders.configAudioLoader)(nameTemplate), {
|
78
73
|
test: /\.html$/,
|
79
74
|
use: {
|
80
75
|
loader: 'html-loader',
|
@@ -83,9 +78,6 @@ module.exports = {
|
|
83
78
|
interpolate: 'require'
|
84
79
|
}
|
85
80
|
}
|
86
|
-
}, {
|
87
|
-
test: /\.ogg$/,
|
88
|
-
use: ['file-loader?name=./fonts/[name].[ext]']
|
89
81
|
}, {
|
90
82
|
test: /\.tmpl$/,
|
91
83
|
use: [{
|
@@ -17,6 +17,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
17
17
|
// import TerserPlugin from 'terser-webpack-plugin';
|
18
18
|
let options = (0, _utils.getOptions)();
|
19
19
|
let {
|
20
|
+
unstableDepsInverse,
|
20
21
|
app: {
|
21
22
|
folder,
|
22
23
|
context,
|
@@ -26,8 +27,10 @@ let {
|
|
26
27
|
removeAttribute,
|
27
28
|
enableSMap,
|
28
29
|
server,
|
30
|
+
combinerMq,
|
29
31
|
hasRTL,
|
30
32
|
rtlExclude,
|
33
|
+
hoverActive,
|
31
34
|
cssUniqueness,
|
32
35
|
server: {
|
33
36
|
mode
|
@@ -80,7 +83,7 @@ module.exports = {
|
|
80
83
|
concatenateModules: true,
|
81
84
|
minimize: true,
|
82
85
|
// by default if minimize: true in webpack minimize then webpack automaticaly add TerserPlugin,
|
83
|
-
// So we are overrideing it.
|
86
|
+
// So we are overrideing it.
|
84
87
|
// minimizer: [
|
85
88
|
// new TerserPlugin({
|
86
89
|
// cache: true,
|
@@ -143,10 +146,10 @@ module.exports = {
|
|
143
146
|
}, seperateCssModules ? {
|
144
147
|
test: /\.css$/,
|
145
148
|
exclude: /\.module\.css$/,
|
146
|
-
use: (0, _loaderUtils.getCSSLoaders)(hasRTL, rtlExclude, '[local]', false, null)
|
149
|
+
use: (0, _loaderUtils.getCSSLoaders)(hasRTL, rtlExclude, hoverActive, keyframesRedMtn, '[local]', false, null)
|
147
150
|
} : null, {
|
148
151
|
test: seperateCssModules ? /\.module\.css$/ : /\.css$/,
|
149
|
-
use: (0, _loaderUtils.getCSSLoaders)(hasRTL, rtlExclude, false, cssUniqueness, selectorReplace, cssHashSelectors, classNamePrefix)
|
152
|
+
use: (0, _loaderUtils.getCSSLoaders)(hasRTL, combinerMq, rtlExclude, hoverActive, false, cssUniqueness, selectorReplace, cssHashSelectors, classNamePrefix)
|
150
153
|
}, {
|
151
154
|
test: /\.jpe?g$|\.gif$|\.png$/,
|
152
155
|
use: [{
|
@@ -208,10 +211,10 @@ module.exports = {
|
|
208
211
|
ZC: '$ZC'
|
209
212
|
},
|
210
213
|
resolve: {
|
211
|
-
modules: [_path.default.resolve(__dirname, '..', '..', 'node_modules'), 'node_modules'],
|
214
|
+
modules: unstableDepsInverse ? ['node_modules', _path.default.resolve(__dirname, '..', '..', 'node_modules')] : [_path.default.resolve(__dirname, '..', '..', 'node_modules'), 'node_modules'],
|
212
215
|
alias: disableES5Transpile ? _libAlias.libAlias : {}
|
213
216
|
},
|
214
217
|
resolveLoader: {
|
215
|
-
modules: [_path.default.resolve(__dirname, '..', '..', 'node_modules'), 'node_modules']
|
218
|
+
modules: unstableDepsInverse ? ['node_modules', _path.default.resolve(__dirname, '..', '..', 'node_modules')] : [_path.default.resolve(__dirname, '..', '..', 'node_modules'), 'node_modules']
|
216
219
|
}
|
217
220
|
};
|
@@ -0,0 +1,88 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.configAudioLoader = configAudioLoader;
|
7
|
+
exports.configFontLoader = configFontLoader;
|
8
|
+
exports.configImageLoader = configImageLoader;
|
9
|
+
exports.configSVGLoader = configSVGLoader;
|
10
|
+
exports.createNameTemplate = createNameTemplate;
|
11
|
+
// function getLoaderOptionQueryString(params) {
|
12
|
+
const ImageExtRegex = /\.jpe?g$|\.gif$|\.png$/;
|
13
|
+
const FontExtRegex = /\.woff2|\.woff$|\.ttf$|\.eot$/;
|
14
|
+
const SVGExtRegex = /\.svg$/;
|
15
|
+
const AudioExtRegex = /\.ogg$/;
|
16
|
+
|
17
|
+
function createLoaderOptionQueryString(loaderName, nameTemplate, limit = 1000) {
|
18
|
+
return `${loaderName}?limit=${limit}&name=${nameTemplate}`;
|
19
|
+
}
|
20
|
+
|
21
|
+
function configImageLoader(nameTemplate) {
|
22
|
+
return {
|
23
|
+
test: ImageExtRegex,
|
24
|
+
use: createLoaderOptionQueryString('url-loader', `./images/${nameTemplate}`)
|
25
|
+
};
|
26
|
+
}
|
27
|
+
|
28
|
+
function configFontLoader(nameTemplate) {
|
29
|
+
return {
|
30
|
+
test: FontExtRegex,
|
31
|
+
use: createLoaderOptionQueryString('url-loader', `./fonts/${nameTemplate}`)
|
32
|
+
};
|
33
|
+
}
|
34
|
+
|
35
|
+
function configSVGLoader(nameTemplate) {
|
36
|
+
return {
|
37
|
+
test: SVGExtRegex,
|
38
|
+
use: createLoaderOptionQueryString('url-loader', `./fonts/${nameTemplate}`, 1)
|
39
|
+
};
|
40
|
+
}
|
41
|
+
|
42
|
+
function configAudioLoader(nameTemplate) {
|
43
|
+
return {
|
44
|
+
test: AudioExtRegex,
|
45
|
+
use: createLoaderOptionQueryString('file-loader', `./fonts/${nameTemplate}`, 1)
|
46
|
+
};
|
47
|
+
}
|
48
|
+
|
49
|
+
function createNameTemplate(enableChunkHash) {
|
50
|
+
const ext = `${enableChunkHash ? '.[hash:20]' : ''}.[ext]`;
|
51
|
+
return `[name]${ext}`;
|
52
|
+
}
|
53
|
+
/*
|
54
|
+
export function createImageAndFontsAndSVGLoaders(enableChunkHash) {
|
55
|
+
const nameTemplate = createNameTemplate(enableChunkHash);
|
56
|
+
return [
|
57
|
+
configImageLoader(nameTemplate),
|
58
|
+
configFontLoader(nameTemplate),
|
59
|
+
configSVGLoader(nameTemplate),
|
60
|
+
configAudioLoader(nameTemplate)
|
61
|
+
];
|
62
|
+
}
|
63
|
+
*/
|
64
|
+
|
65
|
+
/*
|
66
|
+
export function createLoaderOptionObject(
|
67
|
+
loaderName,
|
68
|
+
nameTemplate,
|
69
|
+
fallback,
|
70
|
+
limit = 1000
|
71
|
+
) {
|
72
|
+
return {
|
73
|
+
loader: loaderName,
|
74
|
+
options: {
|
75
|
+
limit,
|
76
|
+
name: nameTemplate,
|
77
|
+
fallback
|
78
|
+
}
|
79
|
+
};
|
80
|
+
}
|
81
|
+
|
82
|
+
function configLoaderObject(filter, loaderAndOptions) {
|
83
|
+
return {
|
84
|
+
test: filter,
|
85
|
+
use: loaderAndOptions
|
86
|
+
};
|
87
|
+
}
|
88
|
+
*/
|
@@ -16,7 +16,7 @@ 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, rtlExclude, classNameBlob, cssUniqueness, selectorReplace, cssHashSelectors, classNamePrefix) => {
|
19
|
+
let getCSSLoaders = (hasRTL, combinerMq, rtlExclude, hoverActive, classNameBlob, cssUniqueness, selectorReplace, cssHashSelectors, classNamePrefix) => {
|
20
20
|
const {
|
21
21
|
devCssFileBountry
|
22
22
|
} = options.app;
|
@@ -28,7 +28,8 @@ let getCSSLoaders = (hasRTL, rtlExclude, classNameBlob, cssUniqueness, selectorR
|
|
28
28
|
} = options.impactService;
|
29
29
|
let rtlExcludeLocal = isWin ? rtlExclude.map(r => r.replace(/\//g, '\\')) : rtlExclude;
|
30
30
|
let cssLoaderOptions = {
|
31
|
-
importLoaders: hasRTL ? 1 : 0,
|
31
|
+
// importLoaders: hasRTL||hoverActive ? 1 : 0,
|
32
|
+
importLoaders: 1,
|
32
33
|
modules: {},
|
33
34
|
sourceMap: true
|
34
35
|
};
|
@@ -50,7 +51,8 @@ let getCSSLoaders = (hasRTL, rtlExclude, classNameBlob, cssUniqueness, selectorR
|
|
50
51
|
return `${prefix} ${selector}`; // Make selectors like [dir=rtl] > .selector
|
51
52
|
}
|
52
53
|
})]
|
53
|
-
})
|
54
|
+
}), // require('postcss-import')(),
|
55
|
+
combinerMq && require('postcss-combine-media-query')(), hoverActive && require('../postcss-plugins/hoverActivePlugin')()].filter(Boolean);
|
54
56
|
return [cssSelectorZipPath && {
|
55
57
|
loader: require.resolve('../loaders/selectorMappingLoader')
|
56
58
|
}, {
|