-
Notifications
You must be signed in to change notification settings - Fork 12k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into webpack-feature-basehref
- Loading branch information
Showing
52 changed files
with
2,046 additions
and
502 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
addon/ng2/blueprints/module/files/__path__/__name__.module.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/* tslint:disable:no-unused-variable */ | ||
|
||
import <%= classifiedModuleName %>Module from './<%= dasherizedModuleName %>.module'; | ||
|
||
describe('<%= classifiedModuleName %>Module', () => { | ||
let <%= camelizedModuleName %>Module; | ||
|
||
beforeEach(() => { | ||
<%= camelizedModuleName %>Module = new <%= classifiedModuleName %>Module(); | ||
}); | ||
|
||
it('should create an instance', () => { | ||
expect(<%= camelizedModuleName %>Module).toBeTruthy(); | ||
}) | ||
}); |
8 changes: 8 additions & 0 deletions
8
addon/ng2/blueprints/module/files/__path__/__name__.module.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { CommonModule } from '@angular/common'; | ||
|
||
@NgModule({ | ||
imports: [ CommonModule ], | ||
declarations: [] | ||
}) | ||
export default class <%= classifiedModuleName %>Module { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
var dynamicPathParser = require('../../utilities/dynamic-path-parser'); | ||
var Blueprint = require('ember-cli/lib/models/blueprint'); | ||
var getFiles = Blueprint.prototype.files; | ||
|
||
module.exports = { | ||
description: '', | ||
|
||
availableOptions: [ | ||
{ name: 'spec', type: Boolean, default: false } | ||
], | ||
|
||
normalizeEntityName: function (entityName) { | ||
var parsedPath = dynamicPathParser(this.project, entityName); | ||
|
||
this.dynamicPath = parsedPath; | ||
return parsedPath.name; | ||
}, | ||
|
||
locals: function (options) { | ||
return { | ||
dynamicPath: this.dynamicPath.dir, | ||
spec: options.spec | ||
}; | ||
}, | ||
|
||
files: function() { | ||
var fileList = getFiles.call(this); | ||
|
||
if (!this.options || !this.options.spec) { | ||
fileList = fileList.filter(p => p.indexOf('__name__.module.spec.ts') < 0); | ||
} | ||
|
||
return fileList; | ||
}, | ||
|
||
fileMapTokens: function () { | ||
// Return custom template variables here. | ||
return { | ||
__path__: () => { | ||
this.generatePath = this.dynamicPath.dir; | ||
return this.generatePath; | ||
} | ||
}; | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { BrowserModule } from '@angular/platform-browser'; | ||
import { NgModule } from '@angular/core'; | ||
import { FormsModule } from '@angular/forms' | ||
import { HttpModule } from '@angular/http' | ||
|
||
import { AppComponent } from './app.component'; | ||
|
||
@NgModule({ | ||
declarations: [ | ||
AppComponent | ||
], | ||
imports: [ | ||
BrowserModule, | ||
FormsModule, | ||
HttpModule | ||
], | ||
providers: [], | ||
entryComponents: [AppComponent], | ||
bootstrap: [AppComponent] | ||
}) | ||
export class AppModule { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
export * from './environments/environment'; | ||
export * from './app.component'; | ||
export * from './app.module'; |
Oops, something went wrong.