Skip to content

chore: update blueprints to 2.0.0-alpha-47 #85

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Dec 4, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Component} from 'angular2/angular2';
import {Component} from 'angular2/core';


@Component({
Expand All @@ -13,4 +13,4 @@ export class <%= classifiedModuleName %> {

constructor() {}

}
}
4 changes: 2 additions & 2 deletions addon/ng2/blueprints/ng2/files/karma-test-shim.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ System.config({
}
});

System.import('angular2/src/core/dom/browser_adapter').then(function(browser_adapter) {
System.import('angular2/platform/browser').then(function(browser_adapter) {
// TODO: once beta is out we should change this code to use a "test platform"
browser_adapter.BrowserDomAdapter.makeCurrent();
}).then(function() {
Expand All @@ -37,7 +37,7 @@ System.import('angular2/src/core/dom/browser_adapter').then(function(browser_ada
});

function onlyAppFiles(filePath) {
return /^\/base\/dist\/app\/(?!spec)([a-z0-9-_]+)\.js$/.test(filePath);
return /^\/base\/dist\/app\/(?!spec)([a-z0-9-_\/]+)\.js$/.test(filePath);
}

function onlySpecFiles(path) {
Expand Down
2 changes: 1 addition & 1 deletion addon/ng2/blueprints/ng2/files/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"license": "Apache-2.0",
"dependencies": {
"systemjs": "0.19.4",
"angular2": "2.0.0-alpha.46"
"angular2": "2.0.0-alpha.47"
},
"devDependencies": {
"angular-cli": "0.0.*",
Expand Down
5 changes: 4 additions & 1 deletion addon/ng2/blueprints/ng2/files/src/app.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import {bootstrap} from 'angular2/angular2';
/// <reference path="node_modules/angular2/manual_typings/globals-es6.d.ts"/>
// this should be remove after fixing https://github.com/angular/angular/issues/5596

import {bootstrap} from 'angular2/platform/browser';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

above this line add:

/// <reference path="node_modules/angular2/manual_typings/globals-es6.d.ts"/>

this will resolve all the tsc issues - this is a bug in angular a47. I'll file an issue.

let's add this line and we'll remove it once the bug is fixed.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also add a link to angular/angular#5596 for more context as to why this line is needed

import {<%= jsComponentName %>App} from './app/<%= htmlComponentName %>';


Expand Down
2 changes: 1 addition & 1 deletion addon/ng2/blueprints/ng2/files/src/app/__name__.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Component} from 'angular2/angular2';
import {Component} from 'angular2/core';


@Component({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ import {<%= classifiedModuleName %>} from './<%= dasherizedModuleName %>';

describe('<%= classifiedModuleName %> Pipe', () => {

beforeEachProviders(() => []);
beforeEachProviders(() => [<%= classifiedModuleName%>]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why this change? this looks wrong

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we don't have the providers injected there it throws:

    Failed: No provider for "name"
    Error: DI Exception

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please confirm this. other changes were made.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh. Never mind. I was wrong about this one



it('should ...', inject([<%= classifiedModuleName %>], (pipe:<%= classifiedModuleName %>) => {
expect(pipe.transform(true)).toBe(false);
it('should transform the input', inject([<%= classifiedModuleName %>], (pipe:<%= classifiedModuleName %>) => {
expect(pipe.transform(true)).toBe(null);
}));

});
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Pipe} from 'angular2/angular2';
import {Pipe} from 'angular2/core';


@Pipe({
Expand All @@ -7,7 +7,7 @@ import {Pipe} from 'angular2/angular2';
export class <%= classifiedModuleName %> {

transform(value, args?) {
return value;
return null;
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {<%= classifiedModuleName %>} from './<%= dasherizedModuleName %>';

describe('<%= classifiedModuleName %> Service', () => {

beforeEachProviders(() => []);
beforeEachProviders(() => [<%= classifiedModuleName %>]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, here it makes sense



it('should ...', inject([<%= classifiedModuleName %>], (service:<%= classifiedModuleName %>) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import {Injectable} from 'angular2/angular2';
import {Injectable} from 'angular2/core';


@Injectable()
export class <%= classifiedModuleName %> {

constructor() {}

}
}