Skip to content

Commit

Permalink
feat: support ng6 and ci verifies 5 & 6
Browse files Browse the repository at this point in the history
  • Loading branch information
ike18t committed May 15, 2018
1 parent 0c8b00e commit 8029db1
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 16 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ before_script:
- "sudo chmod 4755 /opt/google/chrome/chrome-sandbox"
before_install:
- npm cache clean --force
script: npm run test:angular-versions
matrix:
notifications:
email:
Expand Down
24 changes: 24 additions & 0 deletions build-with-supported-angluars.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/sh
set -e
VERSIONS="5.0 5.1 5 6"
PACKAGES="common compiler compiler-cli core platform-browser platform-browser-dynamic"

for version in $VERSIONS
do
echo Building with Angular $version...
OLD="rxjs zone.js"
NEW=""
for package in $PACKAGES
do
OLD="$OLD @angular/$package"
NEW="$NEW @angular/$package@$version"
done

echo $version | grep -Eq "^5" && NEW="$NEW rxjs@5.5.5 zone.js@0.8.14" || NEW="$NEW rxjs@6.0.0 zone.js@0.8.26"

npm uninstall --no-save $OLD
npm install --no-save $NEW
npm run verify
done
echo Testing complete
npm install
30 changes: 14 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
"clean": "rm -rf dist coverage",
"lint": "tslint --project tsconfig.json",
"release": "npm run lint && npm run test && npm run build && standard-version",
"test": "karma start"
"test": "karma start",
"test:angular-versions": "sh build-with-supported-angluars.sh",
"verify": "npm run lint && npm run test && npm run build"
},
"repository": {
"type": "git",
Expand All @@ -36,18 +38,16 @@
},
"homepage": "https://github.com/ike18t/flipadelphia#readme",
"peerDependencies": {
"@angular/common": "5.x",
"@angular/core": "5.x"
"@angular/common": "5.x-6.x",
"@angular/core": "5.x-6.x"
},
"devDependencies": {
"@angular/common": "5.x",
"@angular/compiler": "^5.2.5",
"@angular/compiler-cli": "^5.2.5",
"@angular/core": "5.x",
"@angular/forms": "5.x",
"@angular/platform-browser": "5.x",
"@angular/platform-browser-dynamic": "5.x",
"@angular/platform-server": "^5.2.5",
"@angular/common": "6.x",
"@angular/compiler": "6.x",
"@angular/compiler-cli": "6.x",
"@angular/core": "6.x",
"@angular/platform-browser": "6.x",
"@angular/platform-browser-dynamic": "6.x",
"@types/core-js": "^0.9.43",
"@types/jasmine": "^2.5.53",
"@types/node": "^8.0.17",
Expand All @@ -59,15 +59,13 @@
"karma-jasmine-html-reporter": "^0.2.2",
"karma-sourcemap-loader": "^0.3.7",
"karma-typescript": "^3.0.9",
"merge2": "^1.1.0",
"run-sequence": "^2.1.0",
"rxjs": "5.5.5",
"rxjs": "6.0.0",
"standard-version": "^4.2.0",
"ts-mocks": "^2.0.0",
"ts-node": "^4.1.0",
"tslint": "^5.9.1",
"typescript": "^2.8.0-dev.20180217",
"zone.js": "^0.8.14"
"typescript": "2.7.2",
"zone.js": "^0.8.26"
},
"directories": {
"src": "src"
Expand Down

0 comments on commit 8029db1

Please sign in to comment.