0.0.12 • Published 8 years ago
generator-dsg-component v0.0.12
generator-dsg-component
Yeoman generator Following AngularJS Style Guide : johnpapa guide
Forked from AngularJS-SPA-Development generator-sg-component
Getting Started
Yeoman Generators
To install generator-dsg-component from npm, run:
$ npm install -g generator-dsg-componentFinally, initiate the generator:
$ yo dsg-componentGenerators
Available generators:
- Client Side
Route
Generates a new route.
Example:
yo dsg-component:route myroute
[?] Where would you like to create this route? (client/app)
[?] What will the url of your route be? /myrouteProduces:
client/app/myroute/myroute.js
client/app/myroute/myroute.controller.js
client/app/myroute/myroute.controller.spec.js
client/app/myroute/myroute.html
client/app/myroute/myroute.scssController
Generates a controller.
Example:
yo dsg-component:controller user
[?] Where would you like to create this controller? (client/app)Produces:
client/app/user/user.controller.js
client/app/user/user.controller.spec.jsDirective
Generates a directive.
Example:
yo dsg-component:directive myDirective
[?] Where would you like to create this directive? (client/app)
[?] Does this directive need an external html file? YesProduces:
client/app/myDirective/myDirective.directive.js
client/app/myDirective/myDirective.directive.spec.js
client/app/myDirective/myDirective.html
client/app/myDirective/myDirective.scssSimple directive without an html file
Example:
yo dsg-component:directive simple
[?] Where would you like to create this directive? (client/app)
[?] Does this directive need an external html file? NoProduces:
client/app/simple/simple.directive.js
client/app/simple/simple.directive.spec.jsComponent
Generates a component.
Example:
yo dsg-component:component myComponent
[?] Where would you like to create this component? (client/app)
[?] Does this component need an external html file? YesProduces:
client/app/myComponent/myComponent.component.js
client/app/myComponent/myComponent.component.spec.js
client/app/myComponent/myComponent.html
client/app/myComponent/myComponent.scssSimple Component without an html file
Example:
yo dsg-component:component simpleComponent
[?] Where would you like to create this component? (client/app)
[?] Does this component need an external html file? NoProduces:
client/app/simpleComponent/simpleComponent.component.js
client/app/simpleComponent/simpleComponent.component.spec.jsFilter
Generates a filter.
Example:
yo dsg-component:filter myFilter
[?] Where would you like to create this filter? (client/app)Produces:
client/app/myFilter/myFilter.filter.js
client/app/myFilter/myFilter.filter.spec.jsService
Generates an AngularJS service. Usage is similar to Factory, Provider
Example:
yo dsg-component:service myService
[?] Where would you like to create this service? (client/app)Produces:
client/app/myService/myService.service.js
client/app/myService/myService.service.spec.jsDecorator
Generates an AngularJS service decorator.
Example:
yo dsg-component:decorator myDecorator
[?] Where would you like to create this decorator? (client/app)Produces
client/app/myDecorator/myDecorator.decorator.jsLicense
MIT