@progress/kendo-package-tasks 4.0.34-dev.6 → 4.0.34
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/CHANGELOG.md +11 -0
- package/package.json +3 -3
- package/webpack.config.js +31 -51
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [4.0.34](https://github.com/telerik/kendo-build-tasks/compare/@progress/kendo-package-tasks@4.0.33...@progress/kendo-package-tasks@4.0.34) (2022-03-01)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **kendo-package-tasks:** do not include peer dependencies in CDN bundles ([fd36d5f](https://github.com/telerik/kendo-build-tasks/commit/fd36d5f5a15c0cf93ff07a3873384ce354f9a5b8))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [4.0.33](https://github.com/telerik/kendo-build-tasks/compare/@progress/kendo-package-tasks@4.0.32...@progress/kendo-package-tasks@4.0.33) (2021-12-13)
|
|
7
18
|
|
|
8
19
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-package-tasks",
|
|
3
3
|
"description": "An utility package exporting gulp tasks for Kendo UI NPM packages",
|
|
4
|
-
"version": "4.0.34
|
|
4
|
+
"version": "4.0.34",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/telerik/kendo-build-tasks.git"
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"Kendo UI"
|
|
15
15
|
],
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@progress/kendo-common-tasks": "^7.9.1
|
|
17
|
+
"@progress/kendo-common-tasks": "^7.9.1",
|
|
18
18
|
"@telerik/eslint-config": "^1.1.0",
|
|
19
19
|
"buble": "^0.20.0",
|
|
20
20
|
"buble-loader": "^0.5.1",
|
|
@@ -52,5 +52,5 @@
|
|
|
52
52
|
"publishConfig": {
|
|
53
53
|
"access": "public"
|
|
54
54
|
},
|
|
55
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "d312b6e9168c3b21c723d72374782822c0e33f2d"
|
|
56
56
|
}
|
package/webpack.config.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
const commonTasks = require('@progress/kendo-common-tasks');
|
|
2
1
|
const path = require('path');
|
|
2
|
+
const commonTasks = require('@progress/kendo-common-tasks');
|
|
3
|
+
const { umdExternals } = require('@progress/kendo-common-tasks/umd-externals');
|
|
3
4
|
|
|
4
5
|
const sourceExtensions = [ '.js' ];
|
|
5
6
|
const nodeModulesPath = path.join(__dirname, 'node_modules');
|
|
@@ -7,16 +8,10 @@ const nodeModulesPath = path.join(__dirname, 'node_modules');
|
|
|
7
8
|
const resolve = commonTasks.resolveConfig(sourceExtensions, nodeModulesPath);
|
|
8
9
|
|
|
9
10
|
const packageInfo = require(path.join(process.cwd(), 'package.json'));
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
.map(dep => new RegExp(`^${dep}`));
|
|
15
|
-
|
|
16
|
-
const prebuilt = [
|
|
17
|
-
/jszip[\/\\]dist[\/\\]jszip.js/,
|
|
18
|
-
/pako[\/\\]dist[\/\\]pako_deflate.js/
|
|
19
|
-
];
|
|
11
|
+
const packageKeys = (key) => Object.keys(packageInfo[key] || {});
|
|
12
|
+
const peerDependencies = packageKeys('peerDependencies');
|
|
13
|
+
const allDependencies = packageKeys('dependencies').concat(peerDependencies);
|
|
14
|
+
const matchStartsWith = (key) => new RegExp(`^${key}`);
|
|
20
15
|
|
|
21
16
|
const loaders = [
|
|
22
17
|
{
|
|
@@ -29,43 +24,31 @@ const loaders = [
|
|
|
29
24
|
}
|
|
30
25
|
];
|
|
31
26
|
|
|
27
|
+
const cdn = commonTasks.webpackCommonConfig({
|
|
28
|
+
resolve,
|
|
29
|
+
stats: { assets: false },
|
|
30
|
+
output: { libraryTarget: 'umd' },
|
|
31
|
+
plugins: [],
|
|
32
|
+
optimization: {
|
|
33
|
+
minimize: true
|
|
34
|
+
},
|
|
35
|
+
module: {
|
|
36
|
+
rules: loaders
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
|
|
32
40
|
module.exports = {
|
|
41
|
+
// dist/cdn/js/<package-name>.js
|
|
33
42
|
CDN: {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
output: { libraryTarget: 'umd' },
|
|
38
|
-
|
|
39
|
-
plugins: [
|
|
40
|
-
],
|
|
41
|
-
optimization: {
|
|
42
|
-
minimize: true
|
|
43
|
-
},
|
|
44
|
-
module: {
|
|
45
|
-
rules: loaders,
|
|
46
|
-
noParse: prebuilt
|
|
47
|
-
}
|
|
43
|
+
...cdn,
|
|
44
|
+
externals: umdExternals(peerDependencies)
|
|
48
45
|
},
|
|
49
46
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
output: { libraryTarget: 'umd' },
|
|
56
|
-
|
|
57
|
-
externals: packageDependencies,
|
|
58
|
-
|
|
59
|
-
plugins: [
|
|
60
|
-
],
|
|
61
|
-
optimization: {
|
|
62
|
-
minimize: true
|
|
63
|
-
},
|
|
64
|
-
module: {
|
|
65
|
-
rules: loaders,
|
|
66
|
-
noParse: prebuilt
|
|
67
|
-
}
|
|
68
|
-
}), // CDN
|
|
47
|
+
// dist/cdn/main.js
|
|
48
|
+
umdPackage: {
|
|
49
|
+
...cdn,
|
|
50
|
+
externals: umdExternals(allDependencies)
|
|
51
|
+
},
|
|
69
52
|
|
|
70
53
|
npmPackage: {
|
|
71
54
|
mode: 'production',
|
|
@@ -76,11 +59,10 @@ module.exports = {
|
|
|
76
59
|
externals: [
|
|
77
60
|
/^\.\//,
|
|
78
61
|
/^\.\.\//
|
|
79
|
-
].concat(
|
|
62
|
+
].concat(allDependencies.map(matchStartsWith)),
|
|
80
63
|
|
|
81
64
|
module: {
|
|
82
|
-
rules: loaders
|
|
83
|
-
noParse: prebuilt
|
|
65
|
+
rules: loaders
|
|
84
66
|
}
|
|
85
67
|
}, // npmPackage
|
|
86
68
|
|
|
@@ -91,8 +73,7 @@ module.exports = {
|
|
|
91
73
|
"cheerio": "global"
|
|
92
74
|
},
|
|
93
75
|
module: {
|
|
94
|
-
rules: loaders
|
|
95
|
-
noParse: prebuilt
|
|
76
|
+
rules: loaders
|
|
96
77
|
},
|
|
97
78
|
target: 'node'
|
|
98
79
|
}, // test
|
|
@@ -112,8 +93,7 @@ module.exports = {
|
|
|
112
93
|
enforce: 'pre',
|
|
113
94
|
test: /\.js$/,
|
|
114
95
|
loader: require.resolve("source-map-loader")
|
|
115
|
-
} ].concat(loaders)
|
|
116
|
-
noParse: prebuilt
|
|
96
|
+
} ].concat(loaders)
|
|
117
97
|
},
|
|
118
98
|
stats: { colors: true, reasons: true },
|
|
119
99
|
plugins: [
|