Skip to content

Commit 35b154d

Browse files
committed
bug: ensure spaces appear inside braces of imports
Fixes #581
1 parent 3fe3d10 commit 35b154d

File tree

14 files changed

+20
-20
lines changed

14 files changed

+20
-20
lines changed

addon/ng2/blueprints/component/files/__path__/__name__.component.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
ComponentFixture,
1111
TestComponentBuilder
1212
} from 'angular2/testing';
13-
import {<%= classifiedModuleName %>Component} from './<%= dasherizedModuleName %>.component';
13+
import { <%= classifiedModuleName %>Component } from './<%= dasherizedModuleName %>.component';
1414

1515
describe('Component: <%= classifiedModuleName %>', () => {
1616
beforeEachProviders(() => [<%= classifiedModuleName %>Component]);

addon/ng2/blueprints/component/files/__path__/__name__.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {Component, OnInit} from 'angular2/core';
1+
import { Component, OnInit } from 'angular2/core';
22

33
@Component({
44
moduleId: __moduleName,
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export {<%= classifiedModuleName %>Component} from './<%= dasherizedModuleName %>.component';
1+
export { <%= classifiedModuleName %>Component } from './<%= dasherizedModuleName %>.component';

addon/ng2/blueprints/directive/files/__path__/__name__.directive.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ import {
1010
ComponentFixture,
1111
TestComponentBuilder
1212
} from 'angular2/testing';
13-
import {provide, Component} from 'angular2/core';
14-
import {<%= classifiedModuleName %>} from './<%= dasherizedModuleName %>.directive';
13+
import { provide, Component } from 'angular2/core';
14+
import { <%= classifiedModuleName %> } from './<%= dasherizedModuleName %>.directive';
1515

1616
@Component({
1717
selector: 'test-component',

addon/ng2/blueprints/directive/files/__path__/__name__.directive.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {Directive} from 'angular2/core';
1+
import { Directive } from 'angular2/core';
22

33
@Directive({
44
selector: '[<%= rawEntityName %>]'

addon/ng2/blueprints/ng2/files/__path__/app/__name__.component.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
ComponentFixture,
1111
TestComponentBuilder
1212
} from 'angular2/testing';
13-
import {<%= jsComponentName %>AppComponent} from '../app/<%= htmlComponentName %>.component';
13+
import { <%= jsComponentName %>AppComponent } from '../app/<%= htmlComponentName %>.component';
1414

1515
beforeEachProviders(() => [<%= jsComponentName %>AppComponent]);
1616

addon/ng2/blueprints/ng2/files/__path__/app/__name__.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {Component} from 'angular2/core';
1+
import { Component } from 'angular2/core';
22

33
@Component({
44
moduleId: __moduleName,

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import {bootstrap} from 'angular2/platform/browser';
2-
import {enableProdMode} from 'angular2/core';
3-
import {environment} from './app/environment';
4-
import {<%= jsComponentName %>App} from './app/<%= htmlComponentName %>.component';
1+
import { bootstrap } from 'angular2/platform/browser';
2+
import { enableProdMode } from 'angular2/core';
3+
import { environment } from './app/environment';
4+
import { <%= jsComponentName %>App } from './app/<%= htmlComponentName %>.component';
55

66
if (environment.production) {
77
enableProdMode();

addon/ng2/blueprints/pipe/files/__path__/__name__.pipe.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import {
88
TestComponentBuilder,
99
beforeEachProviders
1010
} from 'angular2/testing';
11-
import {provide} from 'angular2/core';
12-
import {<%= classifiedModuleName %>} from './<%= dasherizedModuleName %>.pipe';
11+
import { provide } from 'angular2/core';
12+
import { <%= classifiedModuleName %> } from './<%= dasherizedModuleName %>.pipe';
1313

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

addon/ng2/blueprints/pipe/files/__path__/__name__.pipe.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {Pipe, PipeTransform} from 'angular2/core';
1+
import { Pipe, PipeTransform } from 'angular2/core';
22

33
@Pipe({
44
name: '<%= camelizedModuleName %>'
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export {<%= classifiedModuleName %>} from './<%= dasherizedModuleName %>.pipe';
1+
export { <%= classifiedModuleName %> } from './<%= dasherizedModuleName %>.pipe';

addon/ng2/blueprints/route/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ function _insertImport(content, symbolName, fileName) {
3333
+ content.substr(m.index + m[0].length);
3434
}
3535

36-
const importTemplate = `import {${symbolName}} from '${fileName}';`;
36+
const importTemplate = `import { ${symbolName} } from '${fileName}';`;
3737
// Find the last import and add an import to it.
3838
content = content.replace(/(import.+)\n(?!import)/m, function (f, m1) {
3939
return `${m1}\n${importTemplate}\n`;

addon/ng2/blueprints/service/files/__path__/__name__.service.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import {
88
expect,
99
inject
1010
} from 'angular2/testing';
11-
import {provide} from 'angular2/core';
12-
import {<%= classifiedModuleName %>Service} from './<%= dasherizedModuleName %>.service';
11+
import { provide } from 'angular2/core';
12+
import { <%= classifiedModuleName %>Service } from './<%= dasherizedModuleName %>.service';
1313

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

addon/ng2/blueprints/service/files/__path__/__name__.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {Injectable} from 'angular2/core';
1+
import { Injectable } from 'angular2/core';
22

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

0 commit comments

Comments
 (0)