generator-angular2-eggs

0.0.9 • Public • Published

NPM version Build Status Coverage Status Dependency Status devDependency Status peerDependency Status

Angular2, Component Router, Bootstrap v4-alpha and TingoDB(like MongoDB) App Generator

This generator are using Angular2, Angular Component Router, Bootstrap v4(alpha) and Express on Node.js. Instead of MongoDB, it will use the lighter TingoDB.

Angular we have emphasized the development life cycle. It supports the next thing for that.

  • Unit Test(unfinished)
  • End-to-End Test
  • Documentation(unfinished)
  • Coverage(unfinished)
  • Metric(unfinished)

Usage

Install: npm install -g generator-angular2-eggs

Make a new directory and cd into it:

mkdir [app-name] && cd $_
yo angular2-eggs

Development

Run the following command at the time of development:

npm run build

Although still some warning comes out, never mind :)

Generators

Available generators:

  • yo angular2-eggs:components [name] [name(option)]
  • yo angular2-eggs:attributes [name] [name(option)]
  • yo angular2-eggs:service [name]
  • yo angular2-eggs:server [name]

Case yo angular2-eggs:components appComp

make file

app/components/appcomp/appcomp.ts
app/components/appcomp/appcomp.html
test/components/appcomp/appcomp.spec.ts

component file

@Component({
  selector: 'app-comp',
  templateUrl: 'components/appcomp/appcomp.html'
})
export class AppCompComponent { }

Case yo angular2-eggs:components appComp subComp

make file

app/components/appcomp/appcomp.subcomp.ts
app/components/appcomp/appcomp.subcomp.html
test/components/appcomp/appcomp.subcomp.spec.ts

component file

@Component({
  selector: 'sub-comp',
  templateUrl: 'components/appcomp/appcomp.subcomp.html'
})
export class SubCompComponent { }

Case yo angular2-eggs:attribute appComp

make file

app/components/appcomp/appcomp.ts
app/components/appcomp/appcomp.html
test/components/appcomp/appcomp.spec.ts

component file

@Component({
  selector: '[appComp]',
  templateUrl: 'components/appcomp/appcomp.html'
})
export class AppCompComponent { }

Case yo angular2-eggs:attribute appComp subComp

make file

app/components/appcomp/appcomp.subcomp.ts
app/components/appcomp/appcomp.subcomp.html
test/components/appcomp/appcomp.subcomp.spec.ts

component file

@Component({
  selector: '[subComp]',
  templateUrl: 'components/appcomp/appcomp.subcomp.html'
})
export class SubCompComponent { }

License

MIT License

Package Sidebar

Install

npm i generator-angular2-eggs

Weekly Downloads

8

Version

0.0.9

License

MIT

Last publish

Collaborators

  • albatrosary