Skip to content

Commit

Permalink
Relax peer dependencies to support angular 4.0.0
Browse files Browse the repository at this point in the history
includes: updated karma references to angular/cli

closes #695, closes #636
  • Loading branch information
Mindaugas Bilevicius authored and cormacrelf committed May 21, 2017
1 parent 3898c89 commit 9a56867
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 17 deletions.
29 changes: 15 additions & 14 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,33 @@ const customLaunchers = require('./scripts/sauce-browsers').customLaunchers;
module.exports = function (config) {
const configuration = {
basePath: '',
frameworks: ['jasmine', 'angular-cli'],
frameworks: ['jasmine', '@angular/cli'],
plugins: [
require('karma-jasmine'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('karma-chrome-launcher'),
require('karma-remap-istanbul'),
require('angular-cli/plugins/karma')
require('@angular/cli/plugins/karma')
],
client: {
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
files: [
{pattern: './scripts/test.ts', watched: false}
{ pattern: './scripts/test.ts', watched: false }
],
preprocessors: {
'./scripts/test.ts': ['angular-cli']
'./scripts/test.ts': ['@angular/cli']
},
remapIstanbulReporter: {
reports: {
html: 'coverage',
lcovonly: './coverage/coverage.lcov'
}
coverageIstanbulReporter: {
reports: ['html', 'lcovonly'],
fixWebpackSourcePaths: true
},
angularCli: {
config: './angular-cli.json',
environment: 'dev'
},
reporters: config.angularCli && config.angularCli.codeCoverage
? ['dots', 'karma-remap-istanbul']
: ['dots'],
? ['progress', 'coverage-istanbul']
: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
Expand All @@ -44,7 +45,7 @@ module.exports = function (config) {
flags: ['--no-sandbox']
}
},
mime: { 'text/x-typescript': ['ts','tsx'] },
mime: { 'text/x-typescript': ['ts', 'tsx'] },
client: { captureConsole: true }
};

Expand Down
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@
},
"peerDependencies": {
"@angular/core": "^2.3.1 || >=4.0.0",
"@angular/common": "^2.3.1 || >=4.0.0"
"@angular/common": "^2.3.1 || >=4.0.0",
"@angular/compiler": "^2.3.1 || >=4.0.0",
"@angular/forms": "^2.3.1 || >=4.0.0"
},
"devDependencies": {
"@angular/common": "2.4.3",
Expand Down Expand Up @@ -92,7 +94,8 @@
"karma-chrome-launcher": "^2.0.0",
"karma-cli": "^1.0.1",
"karma-jasmine": "^1.0.2",
"karma-remap-istanbul": "0.4.0",
"karma-jasmine-html-reporter" : "^0.2.2",
"karma-coverage-istanbul-reporter" : "^0.2.0",
"karma-sauce-launcher": "1.1.0",
"lite-server": "2.2.2",
"lodash": "4.17.4",
Expand All @@ -118,4 +121,4 @@
"webdriver-manager": "11.1.1",
"zone.js": "0.7.5"
}
}
}

0 comments on commit 9a56867

Please sign in to comment.