Skip to content

Generates a file structure for large AngularJS applications based on the ng-boilerplate project.

License

Notifications You must be signed in to change notification settings

daxborges/generator-ngbp

Repository files navigation

generator-ngbp Build Status

A generator for Yeoman. Generates a file structure for large AngularJS applications based on ng-boilerplate

Usage

Install generator-ngbp:

npm install -g generator-ngbp

Make a new directory and cd into it:

mkdir my-awesome-app && cd $_

Run yo ngbp, optionally passing an app name:

yo ngbp [app-name]

Run grunt for building and grunt serve for development.

Available Generators

Note: Generators are to be run from the root directory of your app.

App

Usage

yo ngbp [app name]

Creates a new scaffold for a large AngularJS application, prompting you some configuration.

Example:

yo ngbp myApp

Controller

Usage

yo ngbp:controller [module name].<controller name>

Generates a new controller, if you specify a module name, then the controller will be geneated within the given module directory, elsewhere, the controller will be generated within common/controllers folder.

Examples:

yo ngbp:controller foo

Produces app/common/controllers/fooCtrl.js:

angular.module('myApp').controller('fooCtrl', function ($scope) {

  /* Controller code */
});
yo ngbp:controller profile.feed

Produces app/app/profile/feedCtrl.js:

angular.module('profile').controller('feedCtrl', function ($scope) {

  /* Controller code */
});
yo ngbp:controller profile.edit.editFeed

Produces app/app/profile/edit/editFeedCtrl.js:

angular.module('profile.edit').controller('editFeedCtrl', function ($scope) {

  /* Controller code */
});

License

MIT License

About

Generates a file structure for large AngularJS applications based on the ng-boilerplate project.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published