Skip to content

Commit 877d111

Browse files
committed
Merge remote-tracking branch 'origin' into webpack
2 parents 3b5d310 + aea7447 commit 877d111

File tree

9 files changed

+24
-39
lines changed

9 files changed

+24
-39
lines changed

addon/ng2/blueprints/ng2/files/__path__/test.ts

+12-8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
/*global jasmine, __karma__, window*/
23
require('core-js/es6');
34
require('core-js/es7/reflect');
@@ -15,22 +16,25 @@ require('zone.js/dist/sync-test');
1516
// RxJS
1617
require('rxjs/Rx');
1718

18-
let testing: any = require('@angular/core/testing');
19-
let browser: any = require('@angular/platform-browser-dynamic/testing');
19+
Promise.all([
20+
System.import('@angular/core/testing'),
21+
System.import('@angular/platform-browser-dynamic/testing')
22+
]).then(function (providers) {
23+
let testing = providers[0];
24+
let testingBrowser = providers[1];
2025

21-
testing.setBaseTestProviders(
22-
browser.TEST_BROWSER_DYNAMIC_PLATFORM_PROVIDERS,
23-
browser.TEST_BROWSER_DYNAMIC_APPLICATION_PROVIDERS
24-
);
26+
testing.setBaseTestProviders(testingBrowser.TEST_BROWSER_DYNAMIC_PLATFORM_PROVIDERS,
27+
testingBrowser.TEST_BROWSER_DYNAMIC_APPLICATION_PROVIDERS);
28+
});
2529

26-
let testContext: any = require.context('../src', true, /\.spec\.ts/);
30+
let testContext = require.context('../src', true, /\.spec\.ts/);
2731

2832
/*
2933
* get all the files, for each file, call the context function
3034
* that will require the file and load it up here. Context will
3135
* loop and require those spec files here
3236
*/
33-
function requireAll(requireContext: any) {
37+
function requireAll(requireContext) {
3438
return requireContext.keys().map(requireContext);
3539
}
3640

addon/ng2/blueprints/ng2/files/__path__/tsconfig.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
"experimentalDecorators": true,
77
"module": "es6",
88
"target": "es5",
9-
"lib": ["es6", "dom"],
109
"moduleResolution": "node",
1110
"outDir": "./dist/",
1211
"rootDir": ".",
@@ -19,6 +18,6 @@
1918
"bower_components"
2019
],
2120
"files": [
22-
"./src/typings.d.ts"
21+
"typings.d.ts"
2322
]
2423
}

addon/ng2/blueprints/ng2/files/__path__/typings.d.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,13 @@
33
// https://github.com/typings/typings
44
// https://www.typescriptlang.org/docs/handbook/writing-declaration-files.html
55

6-
/// <reference path="<%= refToTypings %>/typings/browser.d.ts" />
6+
/// <reference path="<%= refToTypings %>/typings/index.d.ts" />
7+
/// <reference path="../node_modules/typescript/lib/lib.es2015.core.d.ts" />
8+
/// <reference path="../node_modules/typescript/lib/lib.es2015.collection.d.ts" />
9+
/// <reference path="../node_modules/typescript/lib/lib.es2015.promise.d.ts" />
10+
711
<% if(!isMobile) { %>
12+
declare var System: any;
813
declare var module: { id: string };
914
declare var require: any;
1015
<% } %>

addon/ng2/blueprints/ng2/files/angular-cli-build.js

-21
This file was deleted.

addon/ng2/blueprints/ng2/files/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,6 @@
4747
"ts-node": "0.9.1",
4848
"tslint": "3.11.0",
4949
"typescript": "^1.9.0-dev.20160627-1.0",
50-
"typings": "0.8.1"<%= stylePackage %>
50+
"typings": "^1.3.1"<%= stylePackage %>
5151
}
5252
}
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
2-
"ambientDevDependencies": {
2+
"globalDevDependencies": {
33
"angular-protractor": "registry:dt/angular-protractor#1.5.0+20160425143459",
44
"jasmine": "registry:dt/jasmine#2.2.0+20160412134438",
55
"selenium-webdriver": "registry:dt/selenium-webdriver#2.44.0+20160317120654"
66
},
7-
"ambientDependencies": {
7+
"globalDependencies": {
88
<% if (isMobile) {%>"node": "registry:dt/node#6.0.0+20160621231320" <% } %>
99
}
1010
}

addon/ng2/models/webpack-build-test.ts

-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ export const getWebpackTestConfig = function(projectRoot: string) {
4747
// resolveGlobs: false,
4848
module: "commonjs",
4949
target: "es5",
50-
lib: ['es6', 'dom'],
5150
useForkChecker: true,
5251
removeComments: true
5352
}

addon/ng2/models/webpack-karma-config.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export default function(config) {
1616
preprocessors: { './config/spec-bundle.js': ['coverage', 'webpack', 'sourcemap'] },
1717
webpack: testWebpackConfig,
1818
webpackServer: { noInfo: true },
19-
reporters: [ 'mocha', 'coverage' ],
19+
reporters: ['progress', 'mocha', 'coverage' ],
2020
port: 9876,
2121
colors: true,
2222
logLevel: config.LOG_INFO,

package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,9 @@
3131
"homepage": "https://github.com/angular/angular-cli",
3232
"dependencies": {
3333
"@angular/compiler-cli": "^0.2.0",
34-
"@angularclass/webpack-toolkit": "^1.0.1",
3534
"@types/webpack": "^1.12.22-alpha",
3635
"angular2-template-loader": "^0.4.0",
37-
"awesome-typescript-loader": "^2.0.0-rc.3",
36+
"awesome-typescript-loader": "1.1.1",
3837
"babel-core": "^6.9.1",
3938
"babel-loader": "^6.2.4",
4039
"babel-preset-es2015-webpack": "^6.4.1",

0 commit comments

Comments
 (0)