chore(generators): update generator scripts

This commit is contained in:
Dan Bucholtz
2016-09-13 15:02:37 -05:00
committed by Adam Bradley
parent 35e4033343
commit 2359437114
32 changed files with 57 additions and 497 deletions

View File

@ -0,0 +1,9 @@
<!--
Generated template for the $CLASSNAME component.
See https://angular.io/docs/ts/latest/api/core/index/ComponentMetadata-class.html
for more info on Angular 2 Components.
-->
<div>
{{text}}
</div>

View File

@ -0,0 +1,3 @@
.$FILENAME {
}

View File

@ -0,0 +1,6 @@
describe('$CLASSNAME', () => {
it('should do something', () => {
expect(true).toEqual(true);
});
});

View File

@ -0,0 +1,20 @@
import { Component } from '@angular/core';
/*
Generated class for the $CLASSNAME component.
See https://angular.io/docs/ts/latest/api/core/index/ComponentMetadata-class.html
for more info on Angular 2 Components.
*/
@Component({
selector: '$FILENAME',
templateUrl: '$FILENAME.html'
})
export class $CLASSNAME {
text: string;
constructor() {
this.text = 'Hello World';
}
}

View File

@ -0,0 +1,6 @@
describe('$CLASSNAME', () => {
it('should do something', () => {
expect(true).toEqual(true);
});
});

View File

@ -0,0 +1,16 @@
import { Directive } from '@angular/core';
/*
Generated class for the $CLASSNAME directive.
See https://angular.io/docs/ts/latest/api/core/index/DirectiveMetadata-class.html
for more info on Angular 2 Directives.
*/
@Directive({
selector: '[$FILENAME]' // Attribute selector
})
export class $CLASSNAME {
constructor() {
console.log('Hello World');
}
}

View File

@ -0,0 +1,18 @@
<!--
Generated template for the $CLASSNAME page.
See http://ionicframework.com/docs/v2/components/#navigation for more info on
Ionic pages and navigation.
-->
<ion-header>
<ion-navbar>
<ion-title>$SUPPLIEDNAME</ion-title>
</ion-navbar>
</ion-header>
<ion-content padding>
</ion-content>

View File

@ -0,0 +1,3 @@
.$FILENAME {
}

View File

@ -0,0 +1,6 @@
describe('$CLASSNAME', () => {
it('should do something', () => {
expect(true).toEqual(true);
});
});

View File

@ -0,0 +1,19 @@
import { Component } from '@angular/core';
import { NavController } from 'ionic-angular';
/*
Generated class for the $CLASSNAME page.
See http://ionicframework.com/docs/v2/components/#navigation for more info on
Ionic pages and navigation.
*/
@Component({
templateUrl: '$FILENAME.html'
})
export class $CLASSNAME {
constructor(private navCtrl: NavController) {
}
}

View File

@ -0,0 +1,6 @@
describe('$CLASSNAME', () => {
it('should do something', () => {
expect(true).toEqual(true);
});
});

View File

@ -0,0 +1,21 @@
import { Injectable, Pipe } from '@angular/core';
/*
Generated class for the $CLASSNAME pipe.
See https://angular.io/docs/ts/latest/guide/pipes.html for more info on
Angular 2 Pipes.
*/
@Pipe({
name: '$FILENAME'
})
@Injectable()
export class $CLASSNAME {
/*
Takes a value and makes it lowercase.
*/
transform(value, args) {
value = value + ''; // make sure it's a string
return value.toLowerCase();
}
}

View File

@ -0,0 +1,6 @@
describe('$CLASSNAME', () => {
it('should do something', () => {
expect(true).toEqual(true);
});
});

View File

@ -0,0 +1,17 @@
import { Injectable } from '@angular/core';
import { Http } from '@angular/http';
import 'rxjs/add/operator/map';
/*
Generated class for the $CLASSNAME provider.
See https://angular.io/docs/ts/latest/guide/dependency-injection.html
for more info on providers and Angular 2 DI.
*/
@Injectable()
export class $CLASSNAME {
constructor(private http: Http) {
}
}