mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 12:29:55 +08:00
chore(generators): update generator scripts
This commit is contained in:

committed by
Adam Bradley

parent
35e4033343
commit
2359437114
9
scripts/templates/component/html.tmpl
Normal file
9
scripts/templates/component/html.tmpl
Normal 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>
|
3
scripts/templates/component/scss.tmpl
Normal file
3
scripts/templates/component/scss.tmpl
Normal file
@ -0,0 +1,3 @@
|
||||
.$FILENAME {
|
||||
|
||||
}
|
6
scripts/templates/component/spec.ts.tmpl
Normal file
6
scripts/templates/component/spec.ts.tmpl
Normal file
@ -0,0 +1,6 @@
|
||||
|
||||
describe('$CLASSNAME', () => {
|
||||
it('should do something', () => {
|
||||
expect(true).toEqual(true);
|
||||
});
|
||||
});
|
20
scripts/templates/component/ts.tmpl
Normal file
20
scripts/templates/component/ts.tmpl
Normal 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';
|
||||
}
|
||||
}
|
6
scripts/templates/directive/spec.ts.tmpl
Normal file
6
scripts/templates/directive/spec.ts.tmpl
Normal file
@ -0,0 +1,6 @@
|
||||
|
||||
describe('$CLASSNAME', () => {
|
||||
it('should do something', () => {
|
||||
expect(true).toEqual(true);
|
||||
});
|
||||
});
|
16
scripts/templates/directive/ts.tmpl
Normal file
16
scripts/templates/directive/ts.tmpl
Normal 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');
|
||||
}
|
||||
}
|
18
scripts/templates/page/html.tmpl
Normal file
18
scripts/templates/page/html.tmpl
Normal 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>
|
3
scripts/templates/page/scss.tmpl
Normal file
3
scripts/templates/page/scss.tmpl
Normal file
@ -0,0 +1,3 @@
|
||||
.$FILENAME {
|
||||
|
||||
}
|
6
scripts/templates/page/spec.ts.tmpl
Normal file
6
scripts/templates/page/spec.ts.tmpl
Normal file
@ -0,0 +1,6 @@
|
||||
|
||||
describe('$CLASSNAME', () => {
|
||||
it('should do something', () => {
|
||||
expect(true).toEqual(true);
|
||||
});
|
||||
});
|
19
scripts/templates/page/ts.tmpl
Normal file
19
scripts/templates/page/ts.tmpl
Normal 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) {
|
||||
|
||||
}
|
||||
|
||||
}
|
6
scripts/templates/pipe/spec.ts.tmpl
Normal file
6
scripts/templates/pipe/spec.ts.tmpl
Normal file
@ -0,0 +1,6 @@
|
||||
|
||||
describe('$CLASSNAME', () => {
|
||||
it('should do something', () => {
|
||||
expect(true).toEqual(true);
|
||||
});
|
||||
});
|
21
scripts/templates/pipe/ts.tmpl
Normal file
21
scripts/templates/pipe/ts.tmpl
Normal 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();
|
||||
}
|
||||
}
|
6
scripts/templates/provider/spec.ts.tmpl
Normal file
6
scripts/templates/provider/spec.ts.tmpl
Normal file
@ -0,0 +1,6 @@
|
||||
|
||||
describe('$CLASSNAME', () => {
|
||||
it('should do something', () => {
|
||||
expect(true).toEqual(true);
|
||||
});
|
||||
});
|
17
scripts/templates/provider/ts.tmpl
Normal file
17
scripts/templates/provider/ts.tmpl
Normal 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) {
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user