1.1.0 • Published 7 years ago

generator-yo-ng-js v1.1.0

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

npm.io

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
1.1.0

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago