Skip to content

Angular2, Angular Component Router, Bootstrap v4(alpha), TingoDB(like MongoDB) and Express on Node.js.

Notifications You must be signed in to change notification settings

albatrosary/generator-angular2-eggs

Repository files navigation

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

About

Angular2, Angular Component Router, Bootstrap v4(alpha), TingoDB(like MongoDB) and Express on Node.js.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published