0.1.9 • Published 8 years ago

generator-nglight v0.1.9

Weekly downloads
4
License
ISC
Repository
github
Last release
8 years ago

generator-nglight


A lightweight Angular yeoman generator.

Installation


Before you begin

  1. Make sure you have npm installed
  2. Make sure you have yeoman installed http://yeoman.io npm install -g yo
  3. Make sure you have grunt-cli installed globally npm install -g grunt-cli

Getting started

  1. Install the generator via npm npm install -g generator-nglight
  2. Next, create a directory for your project to live in.
  3. After moving to your newly created directory, run the generator with the following command yo nglight <appname>

    This will generate your new app! You will be prompted for a test framework. You can choose either jasmine or mocha.

  4. Now run npm install and bower install to download dependencies

  5. And walla! you have a fully operational battle station... I mean angular application!

Usage


Running your app

In order to build and run your application, run the following command from the root of your project.

grunt serve

This will build your app into a .tmp/public directory, start up a simple server, and watch for file changes.

Building your app

In order to build your app for production, run the following command from the root of your project.

grunt buildProd

This will minify your Javascript/Stylesheets and build your app into www/. You can test your production code locally by changing the location of the app.js server to www.

TODO: Add subtask for serve which serves from production build folder.

Testing your app

In order to test your app, run npm test. This will start the karma test runner. Note by default karma will watch for file changes and rerun your tests every time you save a file. You can disable this in the karma.conf file.

To run your unit tests a single time, use:

grunt test

Using Sub-generators


ngLight comes built in with several sub-generators which adhere to the Angular 1.x style guide. This is to enforce modular design.

Modules

To generate a new module, use the following command:

yo nglight:module <module name> <directory>

This generates a new sub module (under the main project module) in assets/app//.module.js. BE SURE TO ADD THIS MODULE AS A DEPENDENCY TO THE MAIN MODULE

Routers

To generate a new router, use the following command:

yo nglight:router <module name> <directory>

This generates a new sub router in assets/app//.routes.js.

Controllers

To generate a new controller, use the following command:

yo nglight:controller <moduleName> <directory> <controllerName>

This generates a new controller in assets/app//.controller.js.

Services

To generate a new service, use the following command:

yo nglight:service <moduleName> <directory> <serviceName>

This generates a new service in assets/app//.service.js.

Directive

To generate a new directive, use the following command:

yo nglight:directive <moduleName> <directory> <directiveName>

This generates a new service in assets/app//.directive.js.

Deploying


TODO

0.1.9

8 years ago

0.1.8

8 years ago

0.1.7

8 years ago

0.1.6

8 years ago

0.1.5

8 years ago

0.1.4

8 years ago

0.1.3

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago