From b37bb97c2b1ce8ac896e5dd87f8ce446424c885f Mon Sep 17 00:00:00 2001 From: Jeremy Elbourn Date: Wed, 1 Jun 2016 15:22:09 -0700 Subject: [PATCH] fix: remove circular deps --- .travis.yml | 1 + package.json | 6 ++++-- scripts/ci/build-and-test.sh | 4 +++- scripts/ci/sources/mode.sh | 4 ++++ 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8866678cc2f7..2c4b6624cd55 100644 --- a/.travis.yml +++ b/.travis.yml @@ -36,6 +36,7 @@ env: matrix: # Order: a slower build first, so that we don't occupy an idle travis worker waiting for others to complete. - MODE=lint + - MODE=circular-deps - MODE=e2e - MODE=saucelabs_required - MODE=browserstack_required diff --git a/package.json b/package.json index 68ab2172d247..fc1fc6bd33cd 100644 --- a/package.json +++ b/package.json @@ -8,12 +8,13 @@ "url": "https://github.com/angular/material2.git" }, "scripts": { - "ci:forbidden-identifiers": "node ./scripts/ci/forbidden-identifiers.js", + "ci:forbidden-identifiers": "node ./scripts/ci/forbidden-identifiers.js", "build": "ng build", "demo-app": "ng serve", "test": "karma start test/karma.conf.js", "tslint": "tslint -c tslint.json 'src/**/*.ts'", "stylelint": "stylelint 'src/**/*.scss' --config stylelint-config.json --syntax scss", + "check-circular-deps": "madge --circular ./dist", "typings": "typings install --ambient", "postinstall": "npm run typings", "e2e": "protractor", @@ -60,13 +61,14 @@ "karma-firefox-launcher": "^0.1.7", "karma-jasmine": "^0.3.8", "karma-sauce-launcher": "^0.2.14", + "madge": "^0.5.3", "node-sass": "^3.4.2", "protractor": "^3.3.0", "protractor-accessibility-plugin": "0.1.1", "sass": "^0.5.0", "strip-ansi": "^3.0.0", - "symlink-or-copy": "^1.0.1", "stylelint": "^6.5.1", + "symlink-or-copy": "^1.0.1", "ts-node": "^0.7.3", "tslint": "^3.5.0", "typescript": "^1.9.0-dev", diff --git a/scripts/ci/build-and-test.sh b/scripts/ci/build-and-test.sh index a39be3384f61..ae9f09a58608 100755 --- a/scripts/ci/build-and-test.sh +++ b/scripts/ci/build-and-test.sh @@ -18,7 +18,9 @@ wait_for_tunnel if is_lint; then npm run tslint npm run ci:forbidden-identifiers - npm run stylelint + npm run stylelint +elif is_circular__deps_check; then + npm run check-circular-deps elif is_e2e; then MD_APP=e2e ng serve & sleep 20 diff --git a/scripts/ci/sources/mode.sh b/scripts/ci/sources/mode.sh index ea3b231d0e4c..1fd145798364 100644 --- a/scripts/ci/sources/mode.sh +++ b/scripts/ci/sources/mode.sh @@ -8,3 +8,7 @@ is_e2e() { is_lint() { [[ "$MODE" = lint ]] } + +is_circular_deps_check() { + [[ "$MODE" = circular-deps ]] +}