@progress/kendo-typescript-tasks 10.0.16 → 10.0.17-cdn-bundle.12
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/api.js +2 -3
- package/package.json +4 -4
- package/webpack.config.js +29 -70
package/api.js
CHANGED
|
@@ -3,16 +3,15 @@
|
|
|
3
3
|
const execSync = require('child_process').execSync;
|
|
4
4
|
const path = require('path');
|
|
5
5
|
const typedoc = require('gulp-typedoc');
|
|
6
|
-
const
|
|
6
|
+
const { merge } = require('lodash');
|
|
7
7
|
|
|
8
8
|
const api = require('./src/api/generator.js');
|
|
9
9
|
const apiConfig = require('./api.config.js');
|
|
10
10
|
|
|
11
11
|
module.exports = (gulp, userConfig) => {
|
|
12
12
|
const series = gulp.series;
|
|
13
|
-
const parallel = gulp.parallel;
|
|
14
13
|
|
|
15
|
-
const config =
|
|
14
|
+
const config = merge({}, apiConfig, userConfig);
|
|
16
15
|
const DECLARATIONS = ["typings/index.d.ts", "node_modules/@types/core-js/index.d.ts"];
|
|
17
16
|
|
|
18
17
|
gulp.task('api-json', () => {
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@progress/kendo-typescript-tasks",
|
|
3
3
|
"description": "Kendo UI TypeScript package gulp tasks",
|
|
4
4
|
"main": "gulp-tasks.js",
|
|
5
|
-
"version": "10.0.
|
|
5
|
+
"version": "10.0.17-cdn-bundle.12+90b5187",
|
|
6
6
|
"author": "Telerik",
|
|
7
7
|
"license": "Apache-2.0",
|
|
8
8
|
"scripts": {
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"typescript": "^3.4.5"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@progress/kendo-common-tasks": "^7.9.
|
|
21
|
+
"@progress/kendo-common-tasks": "^7.9.1-cdn-bundle.12+90b5187",
|
|
22
22
|
"core-js": "^2.2.2",
|
|
23
23
|
"del": "2.2.2",
|
|
24
24
|
"gulp": "^4.0.0",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"gulp-typedoc": "~2.2.2",
|
|
28
28
|
"handlebars": "^4.0.5",
|
|
29
29
|
"highlight.js": "9.14.2",
|
|
30
|
-
"lodash
|
|
30
|
+
"lodash": "^4.6.0",
|
|
31
31
|
"mkdirp": "^0.5.0",
|
|
32
32
|
"source-map-loader": "^0.1.5",
|
|
33
33
|
"ts-loader": "4.1.0",
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"publishConfig": {
|
|
47
47
|
"access": "public"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "90b518795c372df38e0df2230ca2f27971a154d7"
|
|
50
50
|
}
|
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 = [ '.ts' ];
|
|
5
6
|
const nodeModulesPath = path.join(__dirname, 'node_modules');
|
|
@@ -8,36 +9,9 @@ const resolve = commonTasks.resolveConfig(sourceExtensions, nodeModulesPath);
|
|
|
8
9
|
|
|
9
10
|
const packageInfo = require(path.join(process.cwd(), 'package.json'));
|
|
10
11
|
const packageKeys = (key) => Object.keys(packageInfo[key] || {});
|
|
11
|
-
|
|
12
|
+
const peerDependencies = packageKeys('peerDependencies');
|
|
13
|
+
const allDependencies = packageKeys('dependencies').concat(peerDependencies);
|
|
12
14
|
const matchStartsWith = (key) => new RegExp(`^${key}`);
|
|
13
|
-
const deps = packageKeys('dependencies').concat(packageKeys('peerDependencies'));
|
|
14
|
-
const packageDependencies = deps.map(matchStartsWith);
|
|
15
|
-
|
|
16
|
-
//list all Angular packages that should not appear in CDN bundles
|
|
17
|
-
const angularPeers = [
|
|
18
|
-
'@angular/animations'
|
|
19
|
-
];
|
|
20
|
-
|
|
21
|
-
//list all packages that should not appear in CDN bundles
|
|
22
|
-
const peers = [
|
|
23
|
-
'@progress/kendo-angular-intl',
|
|
24
|
-
'@progress/kendo-angular-l10n',
|
|
25
|
-
'@progress/kendo-drawing'
|
|
26
|
-
];
|
|
27
|
-
const internal = dep => dep.match(/@progress|@telerik/);
|
|
28
|
-
const isPeer = dep => peers.find(pkg => pkg === dep);
|
|
29
|
-
const isException = dep => dep.match(/tslib/);
|
|
30
|
-
|
|
31
|
-
const prebuilt = [
|
|
32
|
-
/jszip[\/\\]dist[\/\\]jszip.js/,
|
|
33
|
-
/pako[\/\\]dist[\/\\]pako_deflate.js/
|
|
34
|
-
];
|
|
35
|
-
|
|
36
|
-
const cdnExternals = deps
|
|
37
|
-
.filter((dep) => ((!internal(dep) || isPeer(dep)) && !isException(dep)))
|
|
38
|
-
.concat(angularPeers)
|
|
39
|
-
.map(matchStartsWith);
|
|
40
|
-
|
|
41
15
|
|
|
42
16
|
const tsLoader = (compilerOptions) => ({
|
|
43
17
|
test: /\.ts?$/,
|
|
@@ -48,8 +22,21 @@ const tsLoader = (compilerOptions) => ({
|
|
|
48
22
|
}
|
|
49
23
|
});
|
|
50
24
|
|
|
25
|
+
const cdn = commonTasks.webpackCommonConfig({
|
|
26
|
+
resolve,
|
|
27
|
+
stats: { assets: false },
|
|
28
|
+
output: { libraryTarget: 'umd' },
|
|
29
|
+
plugins: [],
|
|
30
|
+
optimization: {
|
|
31
|
+
minimize: true
|
|
32
|
+
},
|
|
33
|
+
module: {
|
|
34
|
+
rules: [ tsLoader({ declaration: false }) ]
|
|
35
|
+
}
|
|
36
|
+
});
|
|
51
37
|
|
|
52
38
|
module.exports = {
|
|
39
|
+
// dist/npm
|
|
53
40
|
npmPackage: commonTasks.webpackCommonConfig({
|
|
54
41
|
resolve,
|
|
55
42
|
|
|
@@ -58,7 +45,7 @@ module.exports = {
|
|
|
58
45
|
externals: [
|
|
59
46
|
/^\.\//,
|
|
60
47
|
/^\.\.\//
|
|
61
|
-
].concat(
|
|
48
|
+
].concat(allDependencies.map(matchStartsWith)),
|
|
62
49
|
|
|
63
50
|
module: {
|
|
64
51
|
rules: [ tsLoader({ sourceMap: true }) ]
|
|
@@ -67,33 +54,25 @@ module.exports = {
|
|
|
67
54
|
devtool: 'source-map'
|
|
68
55
|
}),
|
|
69
56
|
|
|
70
|
-
|
|
71
|
-
|
|
57
|
+
// dist/cdn/js/<package-name>.js
|
|
58
|
+
CDN: {
|
|
59
|
+
...cdn,
|
|
60
|
+
externals: umdExternals(peerDependencies)
|
|
61
|
+
},
|
|
72
62
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
],
|
|
79
|
-
optimization: {
|
|
80
|
-
minimize: true
|
|
81
|
-
},
|
|
82
|
-
externals: cdnExternals,
|
|
83
|
-
|
|
84
|
-
module: {
|
|
85
|
-
rules: [ tsLoader({ declaration: false }) ],
|
|
86
|
-
noParse: prebuilt
|
|
87
|
-
}
|
|
88
|
-
}),
|
|
63
|
+
// dist/cdn/main.js
|
|
64
|
+
umdPackage: {
|
|
65
|
+
...cdn,
|
|
66
|
+
externals: umdExternals(allDependencies)
|
|
67
|
+
},
|
|
89
68
|
|
|
90
69
|
dev: commonTasks.webpackDevConfig({
|
|
91
70
|
resolve,
|
|
92
71
|
rules: [ tsLoader({ sourceMap: true }) ],
|
|
93
|
-
noParse: prebuilt,
|
|
94
72
|
entries: 'examples/**/*.ts'
|
|
95
73
|
}),
|
|
96
74
|
|
|
75
|
+
// dist/systemjs/<package-name>.js
|
|
97
76
|
systemjs: commonTasks.webpackCommonConfig({
|
|
98
77
|
resolve,
|
|
99
78
|
|
|
@@ -102,25 +81,5 @@ module.exports = {
|
|
|
102
81
|
module: {
|
|
103
82
|
rules: [ tsLoader({ declaration: false }) ]
|
|
104
83
|
}
|
|
105
|
-
}),
|
|
106
|
-
|
|
107
|
-
umdPackage: commonTasks.webpackCommonConfig({
|
|
108
|
-
resolve,
|
|
109
|
-
|
|
110
|
-
stats: { assets: false },
|
|
111
|
-
|
|
112
|
-
output: { libraryTarget: 'umd' },
|
|
113
|
-
|
|
114
|
-
externals: packageDependencies,
|
|
115
|
-
|
|
116
|
-
plugins: [
|
|
117
|
-
],
|
|
118
|
-
optimization: {
|
|
119
|
-
minimize: true
|
|
120
|
-
},
|
|
121
|
-
module: {
|
|
122
|
-
rules: [ tsLoader({ declaration: false }) ],
|
|
123
|
-
noParse: prebuilt
|
|
124
|
-
}
|
|
125
84
|
})
|
|
126
85
|
};
|