parent
2d73583253
commit
ad9f02a73e
17
gulpfile.js
17
gulpfile.js
|
@ -101,6 +101,22 @@ gulp.task('lint', ['format:enforce', 'tools:build'], () => {
|
||||||
|
|
||||||
gulp.task('tools:build', (done) => { tsc('tools/', done); });
|
gulp.task('tools:build', (done) => { tsc('tools/', done); });
|
||||||
|
|
||||||
|
gulp.task('check-cycle', (done) => {
|
||||||
|
var madge = require('madge');
|
||||||
|
|
||||||
|
var dependencyObject = madge(['dist/all/'], {
|
||||||
|
format: 'cjs',
|
||||||
|
extensions: ['.js'],
|
||||||
|
onParseFile: function(data) { data.src = data.src.replace(/\/\* circular \*\//g, "//"); }
|
||||||
|
});
|
||||||
|
var circularDependencies = dependencyObject.circular().getArray();
|
||||||
|
if (circularDependencies.length > 0) {
|
||||||
|
console.log('Found circular dependencies!');
|
||||||
|
console.log(circularDependencies);
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
|
||||||
gulp.task('serve', () => {
|
gulp.task('serve', () => {
|
||||||
let connect = require('gulp-connect');
|
let connect = require('gulp-connect');
|
||||||
|
@ -132,7 +148,6 @@ gulp.task('changelog', () => {
|
||||||
.pipe(gulp.dest('./'));
|
.pipe(gulp.dest('./'));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
function tsc(projectPath, done) {
|
function tsc(projectPath, done) {
|
||||||
let child_process = require('child_process');
|
let child_process = require('child_process');
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,11 @@
|
||||||
|
/**
|
||||||
|
* @license
|
||||||
|
* Copyright Google Inc. All Rights Reserved.
|
||||||
|
*
|
||||||
|
* Use of this source code is governed by an MIT-style license that can be
|
||||||
|
* found in the LICENSE file at https://angular.io/license
|
||||||
|
*/
|
||||||
|
|
||||||
import {CompileIdentifierMetadata} from '../compile_metadata';
|
import {CompileIdentifierMetadata} from '../compile_metadata';
|
||||||
import {StringMapWrapper} from '../facade/collection';
|
import {StringMapWrapper} from '../facade/collection';
|
||||||
import {BaseException} from '../facade/exceptions';
|
import {BaseException} from '../facade/exceptions';
|
||||||
|
|
|
@ -26,6 +26,8 @@ echo 'travis_fold:end:test.buildPackages'
|
||||||
./tools/typings-test/test.sh
|
./tools/typings-test/test.sh
|
||||||
$(npm bin)/gulp public-api:enforce
|
$(npm bin)/gulp public-api:enforce
|
||||||
|
|
||||||
|
$(npm bin)/gulp check-cycle
|
||||||
|
|
||||||
echo 'travis_fold:start:test.e2e.localChrome'
|
echo 'travis_fold:start:test.e2e.localChrome'
|
||||||
cd dist/
|
cd dist/
|
||||||
$(npm bin)/gulp serve &
|
$(npm bin)/gulp serve &
|
||||||
|
|
Loading…
Reference in New Issue