@progress/kendo-typescript-tasks 10.0.17-cdn-bundle.14 → 10.0.17-dev.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 +3 -2
- package/package.json +4 -4
- package/src/api/generator.js +2 -4
- package/src/api/type-utils.js +4 -0
- package/src/api/union-page.hbs +1 -1
- package/webpack.config.js +70 -29
package/api.js
CHANGED
|
@@ -3,15 +3,16 @@
|
|
|
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 deepAssign = require('lodash.merge');
|
|
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;
|
|
13
14
|
|
|
14
|
-
const config =
|
|
15
|
+
const config = deepAssign({}, apiConfig, userConfig);
|
|
15
16
|
const DECLARATIONS = ["typings/index.d.ts", "node_modules/@types/core-js/index.d.ts"];
|
|
16
17
|
|
|
17
18
|
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.17-
|
|
5
|
+
"version": "10.0.17-dev.12+3c5a474",
|
|
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.0",
|
|
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": "^4.6.0",
|
|
30
|
+
"lodash.merge": "^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": "3c5a47420cf2d2fb60c8aacb5463eb8e67ecc8d8"
|
|
50
50
|
}
|
package/src/api/generator.js
CHANGED
|
@@ -83,13 +83,11 @@ const normalizeUnionReferences = (element, members) => {
|
|
|
83
83
|
return child.name === type.name;
|
|
84
84
|
});
|
|
85
85
|
|
|
86
|
-
let toReplace = [];
|
|
87
86
|
if (unionReference && unionReference.kind === 'union') {
|
|
88
87
|
normalizeUnionReferences(unionReference, members);
|
|
89
|
-
toReplace = unionReference.type.types;
|
|
88
|
+
const toReplace = unionReference.type.types;
|
|
89
|
+
types.splice.apply(types, [idx, 1].concat(toReplace));
|
|
90
90
|
}
|
|
91
|
-
|
|
92
|
-
types.splice.apply(types, [idx, 1].concat(toReplace));
|
|
93
91
|
}
|
|
94
92
|
}
|
|
95
93
|
}
|
package/src/api/type-utils.js
CHANGED
package/src/api/union-page.hbs
CHANGED
package/webpack.config.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
const path = require('path');
|
|
2
1
|
const commonTasks = require('@progress/kendo-common-tasks');
|
|
3
|
-
const
|
|
2
|
+
const path = require('path');
|
|
4
3
|
|
|
5
4
|
const sourceExtensions = [ '.ts' ];
|
|
6
5
|
const nodeModulesPath = path.join(__dirname, 'node_modules');
|
|
@@ -9,9 +8,36 @@ const resolve = commonTasks.resolveConfig(sourceExtensions, nodeModulesPath);
|
|
|
9
8
|
|
|
10
9
|
const packageInfo = require(path.join(process.cwd(), 'package.json'));
|
|
11
10
|
const packageKeys = (key) => Object.keys(packageInfo[key] || {});
|
|
12
|
-
|
|
13
|
-
const allDependencies = packageKeys('dependencies').concat(peerDependencies);
|
|
11
|
+
|
|
14
12
|
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
|
+
|
|
15
41
|
|
|
16
42
|
const tsLoader = (compilerOptions) => ({
|
|
17
43
|
test: /\.ts?$/,
|
|
@@ -22,21 +48,8 @@ const tsLoader = (compilerOptions) => ({
|
|
|
22
48
|
}
|
|
23
49
|
});
|
|
24
50
|
|
|
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
|
-
});
|
|
37
51
|
|
|
38
52
|
module.exports = {
|
|
39
|
-
// dist/npm
|
|
40
53
|
npmPackage: commonTasks.webpackCommonConfig({
|
|
41
54
|
resolve,
|
|
42
55
|
|
|
@@ -45,7 +58,7 @@ module.exports = {
|
|
|
45
58
|
externals: [
|
|
46
59
|
/^\.\//,
|
|
47
60
|
/^\.\.\//
|
|
48
|
-
].concat(
|
|
61
|
+
].concat(packageDependencies),
|
|
49
62
|
|
|
50
63
|
module: {
|
|
51
64
|
rules: [ tsLoader({ sourceMap: true }) ]
|
|
@@ -54,25 +67,33 @@ module.exports = {
|
|
|
54
67
|
devtool: 'source-map'
|
|
55
68
|
}),
|
|
56
69
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
...cdn,
|
|
60
|
-
externals: umdExternals(peerDependencies)
|
|
61
|
-
},
|
|
70
|
+
CDN: commonTasks.webpackCommonConfig({
|
|
71
|
+
resolve,
|
|
62
72
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
73
|
+
stats: { assets: false },
|
|
74
|
+
|
|
75
|
+
output: { libraryTarget: 'umd' },
|
|
76
|
+
|
|
77
|
+
plugins: [
|
|
78
|
+
],
|
|
79
|
+
optimization: {
|
|
80
|
+
minimize: true
|
|
81
|
+
},
|
|
82
|
+
externals: cdnExternals,
|
|
83
|
+
|
|
84
|
+
module: {
|
|
85
|
+
rules: [ tsLoader({ declaration: false }) ],
|
|
86
|
+
noParse: prebuilt
|
|
87
|
+
}
|
|
88
|
+
}),
|
|
68
89
|
|
|
69
90
|
dev: commonTasks.webpackDevConfig({
|
|
70
91
|
resolve,
|
|
71
92
|
rules: [ tsLoader({ sourceMap: true }) ],
|
|
93
|
+
noParse: prebuilt,
|
|
72
94
|
entries: 'examples/**/*.ts'
|
|
73
95
|
}),
|
|
74
96
|
|
|
75
|
-
// dist/systemjs/<package-name>.js
|
|
76
97
|
systemjs: commonTasks.webpackCommonConfig({
|
|
77
98
|
resolve,
|
|
78
99
|
|
|
@@ -81,5 +102,25 @@ module.exports = {
|
|
|
81
102
|
module: {
|
|
82
103
|
rules: [ tsLoader({ declaration: false }) ]
|
|
83
104
|
}
|
|
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
|
+
}
|
|
84
125
|
})
|
|
85
126
|
};
|