generator-yo-ng-js
Yeoman ES6 generator for AngularJs. Generate components, directives, controllers, services or filters.
Last updated 2 years ago by aarr0n .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install generator-yo-ng-js 
SYNC missed versions from official npm registry.

node-version dependencies JavaScript Style Guide

Yeoman Generator for AngularJs. Generate either a component, directive, controller, service or a filter.

You'll get prompted with the follow questions; you can skip the first two questions by using arguments (see below):

  • What you want to generate; controller, component etc
  • It's name
  • The name of the Angular module to associate with your choice (if you don't supply a name, a module file will not be created)

Install

Install Yeoman and yo-ng-js.

npm install -g yo generator-yo-ng-js

Usage

Run the generator by using the following:

yo yo-ng-js

For example, creating a component called example will produce the following (components and directives will generate an associated controller and template):

example/
  example.component.js
  example.controller.js
  example.html
  example.js

Using Arguments

You can shortcut the first two questions by passing some arguments.

Pass what you want to generate as the first argument.

yo yo-ng-js component

Pass the name of your choice as the second argument.

yo yo-ng-js component my-component-name

Create an Alias

Add the following to your ~/.bash_aliases.

ng() {
  yo yo-ng-js "$1" "$2"
}

Then you can just run:

ng component my-component-name

Current Tags

  • 1.1.0                                ...           latest (2 years ago)

9 Versions

  • 1.1.0                                ...           2 years ago
  • 1.0.8                                ...           3 years ago
  • 1.0.7                                ...           3 years ago
  • 1.0.6                                ...           3 years ago
  • 1.0.5                                ...           3 years ago
  • 1.0.4                                ...           3 years ago
  • 1.0.3                                ...           3 years ago
  • 1.0.2                                ...           3 years ago
  • 1.0.1                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 9
Last Day 0
Last Week 0
Last Month 1
Dependencies (3)
Dev Dependencies (1)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |