@progress/kendo-common-tasks 7.9.5-dev.2 → 7.9.5-dev.84
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/bin/ci-commit-snapshots +1 -6
- package/bin/ci-semantic-release +1 -1
- package/docs-server.js +4 -5
- package/index.js +9 -6
- package/lint-slugs.js +4 -4
- package/package.json +12 -14
- package/systemjs-bundle/task.js +8 -8
- package/tasks/package-metadata.js +1 -1
- package/umd-externals/index.js +6 -4
- package/verify-modules.js +2 -2
- package/systemjs-bundle/systemjs-bundle.template.js +0 -16
package/bin/ci-commit-snapshots
CHANGED
|
@@ -58,9 +58,4 @@ function set_status {
|
|
|
58
58
|
curl -s -X POST -u "$CREDENTIALS" -d "$PAYLOAD" "$STATUS_URL"
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
|
|
62
|
-
if [[ "$SHIPPABLE" == "true" ]]; then
|
|
63
|
-
set_status 'Shippable'
|
|
64
|
-
else
|
|
65
|
-
set_status 'build'
|
|
66
|
-
fi
|
|
61
|
+
set_status 'Run CI (kendo-workflows) / build'
|
package/bin/ci-semantic-release
CHANGED
|
@@ -32,7 +32,7 @@ sed -i "$REPLACE_YEAR" LICENSE.md
|
|
|
32
32
|
sed -i "$REPLACE_YEAR" NOTICE.txt
|
|
33
33
|
sed -i "$REPLACE_YEAR" README.md
|
|
34
34
|
|
|
35
|
-
ERROR="$(
|
|
35
|
+
ERROR="$(npx -c 'semantic-release pre && npx semantic-prerelease publish --public && npx semantic-release post' 2>&1)"
|
|
36
36
|
EXIT_CODE=$?
|
|
37
37
|
|
|
38
38
|
echo "$ERROR"
|
package/docs-server.js
CHANGED
|
@@ -46,7 +46,7 @@ module.exports = (libraryName, onServerStart, done) => {
|
|
|
46
46
|
(key) => `data-${key}='${opts[key]}'`
|
|
47
47
|
);
|
|
48
48
|
|
|
49
|
-
if (
|
|
49
|
+
if (Object.prototype.hasOwnProperty.call(opts, 'height')) {
|
|
50
50
|
attr.push(`style='height: ${Number(opts['height']) + 50}px'`);
|
|
51
51
|
}
|
|
52
52
|
|
|
@@ -71,10 +71,9 @@ module.exports = (libraryName, onServerStart, done) => {
|
|
|
71
71
|
return hash;
|
|
72
72
|
}, {});
|
|
73
73
|
|
|
74
|
-
return ``
|
|
74
|
+
return String(``
|
|
75
75
|
+ `<div>`
|
|
76
|
-
+ `<h4> Vartiant: ${opts.title}</h4>`
|
|
77
|
-
+ ``;
|
|
76
|
+
+ `<h4> Vartiant: ${opts.title}</h4>`);
|
|
78
77
|
|
|
79
78
|
};
|
|
80
79
|
const embedFile = (_, options) => {
|
|
@@ -96,7 +95,7 @@ module.exports = (libraryName, onServerStart, done) => {
|
|
|
96
95
|
<code class='language-${language}-multiple${preview ? "-preview" : "" }'>${content}</code>
|
|
97
96
|
</pre>`;
|
|
98
97
|
};
|
|
99
|
-
const platformContent = (_, platformCapture, contentCapture) =>
|
|
98
|
+
const platformContent = (_, platformCapture, contentCapture) =>
|
|
100
99
|
(platformCapture === platform ? contentCapture : '');
|
|
101
100
|
|
|
102
101
|
const processPlugins = (content, plugins) => {
|
package/index.js
CHANGED
|
@@ -14,7 +14,7 @@ const BrowserSyncPlugin = require('browser-sync-webpack-plugin');
|
|
|
14
14
|
const listenAddress = process.env['LISTEN_ADDRESS'] || '0.0.0.0';
|
|
15
15
|
const glob = require('glob');
|
|
16
16
|
const $ = require('gulp-load-plugins')();
|
|
17
|
-
const
|
|
17
|
+
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
|
18
18
|
const packageName = require('./package.json').name;
|
|
19
19
|
|
|
20
20
|
const urlLoaderPath = require.resolve('url-loader');
|
|
@@ -56,7 +56,7 @@ exports.resourceLoaders = resourceLoaders;
|
|
|
56
56
|
exports.npmPackageSassLoader = exports.CDNSassLoader;
|
|
57
57
|
|
|
58
58
|
exports.extractCssPlugin = () =>
|
|
59
|
-
new
|
|
59
|
+
new MiniCssExtractPlugin("[name].css");
|
|
60
60
|
|
|
61
61
|
exports.uglifyJsPlugin = () =>
|
|
62
62
|
new webpack.optimize.UglifyJsPlugin();
|
|
@@ -159,11 +159,14 @@ function ucfirst(str) {
|
|
|
159
159
|
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
160
160
|
}
|
|
161
161
|
|
|
162
|
+
const umdExportName = (libraryName) => _.flow(_.camelCase, ucfirst)(libraryName);
|
|
163
|
+
exports.umdExportName = umdExportName;
|
|
164
|
+
|
|
162
165
|
exports.addTasks = (gulp, libraryName, srcGlob, webpackConfig, dtsGlob, options = {}) => { //eslint-disable-line max-params
|
|
163
166
|
const series = gulp.series;
|
|
164
167
|
const parallel = gulp.parallel;
|
|
165
168
|
|
|
166
|
-
const libraryClassName =
|
|
169
|
+
const libraryClassName = umdExportName(libraryName);
|
|
167
170
|
|
|
168
171
|
systemjsBundle(
|
|
169
172
|
gulp,
|
|
@@ -191,9 +194,9 @@ exports.addTasks = (gulp, libraryName, srcGlob, webpackConfig, dtsGlob, options
|
|
|
191
194
|
}));
|
|
192
195
|
|
|
193
196
|
const dtsStream = gulp.src(_.compact(_.concat([], dtsGlob)))
|
|
194
|
-
.pipe($.rename((thePath) =>
|
|
195
|
-
thePath.dirname = path.join('js', thePath.dirname)
|
|
196
|
-
));
|
|
197
|
+
.pipe($.rename((thePath) => {
|
|
198
|
+
thePath.dirname = path.join('js', thePath.dirname);
|
|
199
|
+
}));
|
|
197
200
|
|
|
198
201
|
return merge(srcStream, dtsStream).pipe(gulp.dest('dist/npm'));
|
|
199
202
|
});
|
package/lint-slugs.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
const contains = require('gulp-contains');
|
|
2
|
-
const
|
|
2
|
+
const PluginError = require('plugin-error');
|
|
3
3
|
|
|
4
4
|
module.exports = (gulp, packageName) => {
|
|
5
5
|
const reportError = message => (string, file, cb) => {
|
|
6
|
-
const filename = /[
|
|
6
|
+
const filename = /[/\\](docs.*)$/.exec(file.path)[1];
|
|
7
7
|
const error = `
|
|
8
8
|
${message.replace(/FILE/, filename)}
|
|
9
9
|
I can't tell you exactly where due to technical limitations, sorry.
|
|
10
10
|
Validation provided by ${packageName}.`;
|
|
11
|
-
cb(new
|
|
11
|
+
cb(new PluginError('gulp-contains', error));
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
gulp.task('lint-slugs', () =>
|
|
@@ -18,7 +18,7 @@ module.exports = (gulp, packageName) => {
|
|
|
18
18
|
onFound: reportError("Unknown Liquid tags found in 'FILE'.")
|
|
19
19
|
}))
|
|
20
20
|
.pipe(contains({
|
|
21
|
-
search: /{%\s*slug\s+(?!([a-zA-Z0-9_
|
|
21
|
+
search: /{%\s*slug\s+(?!([a-zA-Z0-9_-])+\s*%})/,
|
|
22
22
|
onFound: reportError("Slugs with invalid characters found in 'FILE'.")
|
|
23
23
|
}))
|
|
24
24
|
);
|
package/package.json
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-common-tasks",
|
|
3
3
|
"description": "Build infrastructure helpers and gulp tasks for Kendo UI Angular 2 / React components",
|
|
4
|
-
"version": "7.9.5-dev.
|
|
4
|
+
"version": "7.9.5-dev.84+dae6822",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/telerik/kendo-build-tasks.git"
|
|
8
8
|
},
|
|
9
9
|
"main": "index.js",
|
|
10
10
|
"scripts": {
|
|
11
|
-
"
|
|
12
|
-
"test": "npm run lint && ./node_modules/.bin/jest"
|
|
11
|
+
"test": "./node_modules/.bin/jest"
|
|
13
12
|
},
|
|
14
13
|
"bin": {
|
|
15
14
|
"ci-utils": "./bin/ci-utils",
|
|
@@ -21,6 +20,7 @@
|
|
|
21
20
|
],
|
|
22
21
|
"dependencies": {
|
|
23
22
|
"@telerik/eslint-config": "1.1.0",
|
|
23
|
+
"acorn": "^8.5.0",
|
|
24
24
|
"autoprefixer": "^6.3.6",
|
|
25
25
|
"babel-core": "^6.0.0",
|
|
26
26
|
"babel-eslint": "^4.1.6",
|
|
@@ -31,21 +31,18 @@
|
|
|
31
31
|
"eslint-plugin-react": "^3.10.0",
|
|
32
32
|
"express": "^4.13.4",
|
|
33
33
|
"express-urlrewrite": "^1.2.0",
|
|
34
|
-
"extract-text-webpack-plugin": "next",
|
|
35
34
|
"file-loader": "^1.1.6",
|
|
36
35
|
"glob": "^6.0.4",
|
|
37
36
|
"graphlib": "2.1.1",
|
|
38
37
|
"gulp": "^4.0.0",
|
|
39
38
|
"gulp-add-src": "^0.2.0",
|
|
40
39
|
"gulp-contains": "^1.1.0",
|
|
41
|
-
"gulp-eslint": "^
|
|
40
|
+
"gulp-eslint": "^6.0.0",
|
|
42
41
|
"gulp-if": "^2.0.0",
|
|
43
|
-
"gulp-load-plugins": "
|
|
42
|
+
"gulp-load-plugins": "^2.0.7",
|
|
44
43
|
"gulp-rename": "^1.2.2",
|
|
45
44
|
"gulp-sourcemaps": "2.6.5",
|
|
46
45
|
"gulp-uglify": "^3.0.0",
|
|
47
|
-
"gulp-util": "^3.0.7",
|
|
48
|
-
"gulp-wrap": "^0.13.0",
|
|
49
46
|
"hbs": "^4.0.0",
|
|
50
47
|
"highlight.js": "9.14.2",
|
|
51
48
|
"jasmine-core": "^2.4.1",
|
|
@@ -54,19 +51,20 @@
|
|
|
54
51
|
"lodash": "^4.6.0",
|
|
55
52
|
"marked": "~0.3.2",
|
|
56
53
|
"merge2": "^1.0.2",
|
|
54
|
+
"mini-css-extract-plugin": "^2.3.0",
|
|
57
55
|
"mkdirp": "^0.5.0",
|
|
58
56
|
"module-deps": "4.0.7",
|
|
57
|
+
"plugin-error": "^1.0.1",
|
|
59
58
|
"resolve-url-loader": "^1.5.0",
|
|
60
59
|
"serve-index": "^1.7.3",
|
|
61
60
|
"socket.io": "=1.4.5",
|
|
62
61
|
"style-loader": "^0.13.0",
|
|
63
62
|
"url-loader": "^0.5.7",
|
|
64
63
|
"vinyl-named": "^1.1.0",
|
|
65
|
-
"webpack": "
|
|
66
|
-
"webpack-dev-server": "
|
|
67
|
-
"webpack-sources": "^
|
|
68
|
-
"webpack-stream": "
|
|
69
|
-
"webpack-system-register": "^1.6.0",
|
|
64
|
+
"webpack": "5.53.0",
|
|
65
|
+
"webpack-dev-server": "^4.2.1",
|
|
66
|
+
"webpack-sources": "^3.2.1",
|
|
67
|
+
"webpack-stream": "7.0.0",
|
|
70
68
|
"yargs": "^3.30.0"
|
|
71
69
|
},
|
|
72
70
|
"jest": {
|
|
@@ -90,5 +88,5 @@
|
|
|
90
88
|
"publishConfig": {
|
|
91
89
|
"access": "public"
|
|
92
90
|
},
|
|
93
|
-
"gitHead": "
|
|
91
|
+
"gitHead": "dae68228558488bc7c6c370a59c4e0314bccffa3"
|
|
94
92
|
}
|
package/systemjs-bundle/task.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
const path = require('path');
|
|
2
2
|
const _ = require('lodash');
|
|
3
|
-
const WebpackSystemRegister = require('webpack-system-register');
|
|
4
|
-
const wrap = require('gulp-wrap');
|
|
5
3
|
const gulpUglify = require('gulp-uglify');
|
|
6
4
|
const $ = require('gulp-load-plugins')();
|
|
7
5
|
|
|
@@ -18,16 +16,18 @@ module.exports = (gulp, { webpackConfig, distName, modules = [], webpackStream,
|
|
|
18
16
|
gulp.task('build-systemjs-bundle', (done) => {
|
|
19
17
|
const config = _.assign({}, webpackConfig);
|
|
20
18
|
|
|
21
|
-
config.
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
19
|
+
config.output = {
|
|
20
|
+
library: {
|
|
21
|
+
type: 'system',
|
|
22
|
+
name: packageName
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
config.externals = packageDependencies;
|
|
26
27
|
|
|
27
28
|
const fail = error => done(error);
|
|
28
29
|
return gulp.src('src/main' + SRC_EXT_GLOB).on("error", fail)
|
|
29
30
|
.pipe(webpackStream(config, webpack)).on("error", fail)
|
|
30
|
-
.pipe(wrap({ src: path.join(__dirname, 'systemjs-bundle.template.js' ) }, { packageName: packageName, modules: modules }, { variable: "data" })).on("error", fail)
|
|
31
31
|
.pipe($.rename((path) => {
|
|
32
32
|
path.basename = distName;
|
|
33
33
|
})).on("error", fail)
|
|
@@ -11,7 +11,7 @@ const metadataPath = packagePath =>
|
|
|
11
11
|
path.join(packagePath, 'src', 'package-metadata.ts');
|
|
12
12
|
|
|
13
13
|
const template = data =>
|
|
14
|
-
`import { PackageMetadata } from '@progress/kendo-licensing';
|
|
14
|
+
`import { PackageMetadata } from '@progress/kendo-licensing';
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* @hidden
|
package/umd-externals/index.js
CHANGED
|
@@ -5,6 +5,7 @@ const knownExternals = {
|
|
|
5
5
|
"@angular/common/http": "ng.common.http",
|
|
6
6
|
"@angular/compiler": "ng.compiler",
|
|
7
7
|
"@angular/forms": "ng.forms",
|
|
8
|
+
"@angular/localize": "ng.localize",
|
|
8
9
|
"@angular/platform-browser": "ng.platformBrowser",
|
|
9
10
|
"@angular/platform-browser-dynamic": "ng.platformBrowserDynamic",
|
|
10
11
|
"@angular/animations": "ng.animations",
|
|
@@ -38,21 +39,22 @@ function toWebpackExternal(module) {
|
|
|
38
39
|
root: externalName.split('.'),
|
|
39
40
|
commonjs: module,
|
|
40
41
|
commonjs2: module
|
|
41
|
-
}
|
|
42
|
+
};
|
|
42
43
|
|
|
43
44
|
return result;
|
|
44
45
|
}
|
|
45
46
|
|
|
46
|
-
function umdExternals(
|
|
47
|
+
function umdExternals(packageDependencies) {
|
|
47
48
|
const externals = {};
|
|
49
|
+
let dependencies = [ ...packageDependencies ];
|
|
48
50
|
|
|
49
51
|
// Sub-packages are not listed in the package dependencies,
|
|
50
52
|
// but we need to mark them as external.
|
|
51
53
|
if (dependencies.includes('@angular/common')) {
|
|
52
|
-
dependencies
|
|
54
|
+
dependencies.push('@angular/common/http');
|
|
53
55
|
}
|
|
54
56
|
if (dependencies.includes('rxjs')) {
|
|
55
|
-
dependencies
|
|
57
|
+
dependencies.push('rxjs/operators');
|
|
56
58
|
}
|
|
57
59
|
|
|
58
60
|
dependencies.forEach(module => {
|
package/verify-modules.js
CHANGED
|
@@ -11,8 +11,8 @@ const debugCycles = (cycles) => cycles.map(printCycle).join('\n\n');
|
|
|
11
11
|
|
|
12
12
|
function verifyModules(index, done) {
|
|
13
13
|
const externalModuleRegexp = process.platform === 'win32' ?
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
/^(\.|\w:)/ :
|
|
15
|
+
/^[/.]/;
|
|
16
16
|
|
|
17
17
|
const g = new graphlib.Graph({ directed: true });
|
|
18
18
|
const md = mdeps({
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
<%= data.contents %>
|
|
2
|
-
|
|
3
|
-
<% for (let idx = 0; idx < data.modules.length; idx++) { %>
|
|
4
|
-
System.register('<%= data.packageName %>/<%= data.modules[idx]%>', ['<%= data.packageName %>'], function($__export) {
|
|
5
|
-
var lib;
|
|
6
|
-
|
|
7
|
-
return {
|
|
8
|
-
setters: [function(dependency) {
|
|
9
|
-
lib = dependency;
|
|
10
|
-
}],
|
|
11
|
-
execute: function() {
|
|
12
|
-
$__export(lib.<%= data.modules[idx] %>);
|
|
13
|
-
}
|
|
14
|
-
};
|
|
15
|
-
});
|
|
16
|
-
<% } %>
|