Skip to content

Commit

Permalink
Fixes for karma config related to breaking changes in @angular:2.0.0-…
Browse files Browse the repository at this point in the history
…rc.1
  • Loading branch information
Charles Fulnecky committed May 14, 2016
1 parent 0bdb0fe commit 7dabcc4
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 5 deletions.
11 changes: 10 additions & 1 deletion generators/app/templates/_package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,22 @@
"file-loader": "^0.8.5",
"html-webpack-plugin": "^2.8.1",
"imports-loader": "^0.6.5",
"istanbul-instrumenter-loader": "^0.1.3",
"jasmine-core": "^2.4.1",
"json-loader": "^0.5.4",
"json-server": "^0.8.12",
"karma": "^0.13.22",
"karma-coverage": "^0.5.2",
"karma-jasmine": "^1.0.2",
"karma-phantomjs-launcher": "^1.0.0",
"karma-spec-reporter": "0.0.26",
"karma-sourcemap-loader": "^0.3.7",
"karma-story-reporter": "^0.3.1",
"karma-webpack": "^1.7.0",
"left-pad": "git://github.com/azer/left-pad.git#bff80e3ef0db0bfaba7698606c4f623433d14355",
"node-sass": "^3.4.2",
"null-loader": "git+https://github.com/webpack/null-loader.git",
"opener": "^1.4.1",
"phantomjs-polyfill": "0.0.2",
"phantomjs-prebuilt": "^2.1.7",
"postcss-loader": "^0.8.0",
Expand All @@ -90,6 +98,7 @@
"typings": "^0.8.1",
"url-loader": "^0.5.7",
"webpack": "^1.13.0",
"webpack-dev-server": "^1.14.1"
"webpack-dev-server": "^1.14.1",
"webpack-load-plugins": "^0.1.2"
}
}
7 changes: 5 additions & 2 deletions generators/app/templates/karma-shim.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ require('@angular/core/testing');
any file that ends with spec.js and get its path. By passing in true
we say do this recursively
*/
var appContext = require.context('./src', true, /root\.spec\.ts/);
var appContext = require.context('./src', true, /root\.?spec\.ts/);

// get all the files, for each file, call the context function
// that will require the file and load it up here. Context will
Expand All @@ -29,4 +29,7 @@ appContext.keys().forEach(appContext);
var testing = require('@angular/core/testing');
var browser = require('@angular/platform-browser-dynamic/testing');

testing.setBaseTestProviders(browser.TEST_BROWSER_PLATFORM_PROVIDERS, browser.TEST_BROWSER_APPLICATION_PROVIDERS);
testing.setBaseTestProviders(
browser.TEST_BROWSER_DYNAMIC_PLATFORM_PROVIDERS,
browser.TEST_BROWSER_DYNAMIC_APPLICATION_PROVIDERS
);
2 changes: 1 addition & 1 deletion generators/app/templates/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ module.exports = (function makeWebpackConfig() {
test: /\.(js|ts)$/,
include: path.resolve('src'),
loader: 'istanbul-instrumenter-loader',
exclude: [/\.spec\.ts$/, /\.e2e\.ts$/, /node_modules/]
exclude: [/\.?spec\.ts$/, /\.e2e\.ts$/, /node_modules/]
});
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "generator-ng2-webpack",
"version": "0.4.3",
"version": "0.4.4",
"description": "An opinionated tool for scaffolding an app using angular2 and webpack",
"homepage": "https://github.com/cmelion/generator-ng2-webpack",
"repository": {
Expand Down

0 comments on commit 7dabcc4

Please sign in to comment.