@oroinc/oro-webpack-config-builder 4.2.1-dev3 → 4.2.1-dev4
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
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
|
|
3
3
|
An integration of OroPlatform based applications with the Webpack.
|
|
4
4
|
|
|
5
|
-
For more details see [the documentation](https://doc.oroinc.com/
|
|
5
|
+
For more details see [the documentation](https://doc.oroinc.com/bundles/platform/AssetBundle/).
|
|
@@ -4,7 +4,7 @@ const ModulesConfigLoader = require('./modules-config-loader');
|
|
|
4
4
|
|
|
5
5
|
class LayoutModulesConfigLoader extends ModulesConfigLoader {
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* @inheritdoc
|
|
8
8
|
*/
|
|
9
9
|
loadConfig(theme, filePath) {
|
|
10
10
|
let themeConfig = super.loadConfig(theme, path.join('/Resources/views/layouts/', theme, filePath));
|
|
@@ -3,6 +3,9 @@ const fs = require('fs');
|
|
|
3
3
|
const merge = require('deepmerge');
|
|
4
4
|
const yaml = require('js-yaml');
|
|
5
5
|
|
|
6
|
+
// merge only unique items
|
|
7
|
+
const arrayMerge = (target, source) => target.concat(source.filter(item => !target.includes(item)));
|
|
8
|
+
|
|
6
9
|
class ModulesConfigLoader {
|
|
7
10
|
/**
|
|
8
11
|
* @returns {Array}
|
|
@@ -43,17 +46,15 @@ class ModulesConfigLoader {
|
|
|
43
46
|
if (!fs.existsSync(source)) return;
|
|
44
47
|
|
|
45
48
|
fs.readdirSync(source).forEach(name => {
|
|
46
|
-
const
|
|
47
|
-
if (!fs.lstatSync(
|
|
49
|
+
const themePath = path.resolve(source, name);
|
|
50
|
+
if (!fs.lstatSync(themePath).isDirectory()) {
|
|
48
51
|
return;
|
|
49
52
|
}
|
|
50
|
-
const themeFile = path.resolve(
|
|
53
|
+
const themeFile = path.resolve(themePath, themeInfoFileName);
|
|
51
54
|
if (!fs.existsSync(themeFile)) return;
|
|
52
55
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}
|
|
56
|
-
themes[name] = yaml.safeLoad(fs.readFileSync(themeFile, 'utf8'));
|
|
56
|
+
const theme = yaml.load(fs.readFileSync(themeFile, 'utf8'));
|
|
57
|
+
themes[name] = merge(themes[name] || {}, theme, {arrayMerge});
|
|
57
58
|
});
|
|
58
59
|
});
|
|
59
60
|
|
|
@@ -71,7 +72,7 @@ class ModulesConfigLoader {
|
|
|
71
72
|
const absolutePath = bundle + filePath;
|
|
72
73
|
if (!fs.existsSync(absolutePath)) return;
|
|
73
74
|
|
|
74
|
-
const doc = yaml.
|
|
75
|
+
const doc = yaml.load(fs.readFileSync(absolutePath, 'utf8'));
|
|
75
76
|
configs = merge(configs, doc);
|
|
76
77
|
});
|
|
77
78
|
return configs;
|
package/oro-webpack-config.js
CHANGED
|
@@ -19,7 +19,7 @@ const ThemeConfigFactory = require('./theme-config-factory');
|
|
|
19
19
|
const path = require('path');
|
|
20
20
|
const prepareModulesMap = require('./plugin/map/prepare-modules-map');
|
|
21
21
|
const resolve = require('enhanced-resolve');
|
|
22
|
-
const webpackMerge = require('webpack-merge');
|
|
22
|
+
const {merge: webpackMerge} = require('webpack-merge');
|
|
23
23
|
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
|
|
24
24
|
const WebpackRTLPlugin = require('webpack-rtl-plugin');
|
|
25
25
|
|
package/package.json
CHANGED
|
@@ -1,46 +1,45 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oroinc/oro-webpack-config-builder",
|
|
3
|
-
"version": "4.2.1-
|
|
3
|
+
"version": "4.2.1-dev4",
|
|
4
4
|
"author": "Oro, Inc (https://www.oroinc.com)",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "An integration of OroPlatform based applications with the Webpack.",
|
|
7
7
|
"main": "oro-webpack-config.js",
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@babel/core": "^7.
|
|
10
|
-
"@babel/plugin-transform-runtime": "^7.
|
|
11
|
-
"@babel/preset-env": "^7.
|
|
12
|
-
"autoprefixer": "9.
|
|
13
|
-
"babel-loader": "^8.
|
|
9
|
+
"@babel/core": "^7.16.0",
|
|
10
|
+
"@babel/plugin-transform-runtime": "^7.16.4",
|
|
11
|
+
"@babel/preset-env": "^7.16.4",
|
|
12
|
+
"autoprefixer": "^9.8.8",
|
|
13
|
+
"babel-loader": "^8.2.3",
|
|
14
14
|
"css-loader": "^3.6.0",
|
|
15
|
-
"deepmerge": "
|
|
15
|
+
"deepmerge": "4.2.2",
|
|
16
16
|
"exports-loader": "^0.7.0",
|
|
17
17
|
"expose-loader": "^0.7.5",
|
|
18
18
|
"extract-loader": "3.1.0",
|
|
19
19
|
"file-loader": "^4.3.0",
|
|
20
20
|
"font-awesome": "4.7.0",
|
|
21
21
|
"happypack": "^5.0.1",
|
|
22
|
-
"html-webpack-plugin": "^3.2.0",
|
|
23
22
|
"imports-loader": "^0.8.0",
|
|
24
23
|
"inject-loader": "^4.0.1",
|
|
25
|
-
"js-yaml": "
|
|
24
|
+
"js-yaml": "4.1.0",
|
|
26
25
|
"mini-css-extract-plugin": "0.7.0",
|
|
27
26
|
"minimist": "^1.2.3",
|
|
28
|
-
"node-sass": "^
|
|
27
|
+
"node-sass": "^6.0.1",
|
|
29
28
|
"optimize-css-assets-webpack-plugin": "5.0.3",
|
|
30
29
|
"path": "0.12.7",
|
|
31
30
|
"postcss-loader": "3.0.0",
|
|
32
|
-
"printf": "^0.6.
|
|
31
|
+
"printf": "^0.6.1",
|
|
33
32
|
"sass-loader": "7.1.0",
|
|
34
33
|
"style-loader": "^0.23.1",
|
|
35
34
|
"terser": "4.1.2",
|
|
36
35
|
"text-loader": "0.0.1",
|
|
37
|
-
"underscore": "
|
|
36
|
+
"underscore": "1.13.*",
|
|
38
37
|
"url-loader": "2.0.1",
|
|
39
|
-
"webpack": "^4.
|
|
40
|
-
"webpack-bundle-analyzer": "^
|
|
41
|
-
"webpack-cli": "^
|
|
42
|
-
"webpack-dev-server": "^
|
|
43
|
-
"webpack-merge": "
|
|
38
|
+
"webpack": "^4.46.0",
|
|
39
|
+
"webpack-bundle-analyzer": "^4.5.0",
|
|
40
|
+
"webpack-cli": "^4.9.1",
|
|
41
|
+
"webpack-dev-server": "^4.5.0",
|
|
42
|
+
"webpack-merge": "5.8.0",
|
|
44
43
|
"webpack-rtl-plugin": "^2.0.0",
|
|
45
44
|
"wildcard": "^2.0.0"
|
|
46
45
|
}
|