Project

ngi

0.02
No commit activity in last 3 years
No release in over 3 years
This tool can make (for example) an AngularJS controller template file for you (.js), so that whenever you want to make a new controller for your app, you don't have to type the same starting code over and over again (by the way, this tool doesn't only create controllers. It does directives, filters... almost anything). ngi has one task, and one task only, which makes it lightweight and specialized. Most AngularJS developers are probably using the command line already (Gulp, Bower, npm, Git, etc.), so why not use the command line to streamline your code-writing too? Type less, write more AngularJS!
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.6
>= 0
>= 0
 Project Readme

ngi 0.4.0

Check out the website.

Table of Contents

  • Quick Start
  • Example
  • Features
  • Installation
  • Tutorials
  • Contributing
  • Info

Quick Start

angular_init (called ngi) creates AngularJS templates for you from the command line so you don't have to type the same starting code over and over again. It's a tool with just one purpose, so it's small and fast.

Get up and running in seconds

Gem Version

$ gem install ngi
$ cd ~/MyAwesomeApp # => go to your app
$ ngi controller # => create a new AngularJS controller

Example

In your shell

Example

Output (new boilerplate code)

// ~/MyAwesomeApp/myAwesome.controller.js

;(function(app) {

  'use strict';

  app.controller('MyAwesomeController',MyAwesomeController);

  MyAwesomeController.$inject = ['$route', '$scope'];

  function MyAwesomeController($route, $scope) {
  
  }

})(angular.module('myModule'));

By the way, the output of this little tool is meant to follow John Papa's AngularJS Style Guide.

Features

What's new in 0.4.x?

  • You can now use custom templates (tutorial)

Have an idea for a feature? Email frontendcollisionblog@gmail.com! Just write: "Hey, I think it would be awesome if you included ____ in ngi because ____."

  • Has default templates to create components for you (directives, controllers, etc.) in ECMAScript5 and CoffeeScript (type ngi -h to see all the available components). By the way, the default templates follow John Papa's AngularJS Style Guide.
  • Supports custom templates (see the tutorial for that)

Installation

You need Ruby 2.1.0 and RubyGems (optional Bundler)

Add this line to your application's Gemfile:

gem 'ngi'

And then execute:

$ bundle

Or install it yourself as:

$ gem install ngi

Tutorials

Contributing

Info

Requirements

Only tested with Ruby 2.1 on Mac OSX Mavericks. Compatibility with previous versions of Ruby cannot be guaranteed.

Disclaimer

angular_init and ngi and the author (Joshua Beam) are not directly associated with AngularJS.

Copyright © 2015 Joshua BeamFront End Collision

MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.