Socket
Book a DemoInstallSign in
Socket

generator-nglight

Package Overview
Dependencies
Maintainers
2
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

generator-nglight

--- A lightweight Angular yeoman generator.

0.1.9
latest
Source
npmnpm
Version published
Weekly downloads
2
100%
Maintainers
2
Weekly downloads
 
Created
Source

generator-nglight

A lightweight Angular yeoman generator.

Installation

Before you begin

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

Getting started

  • Install the generator via npm npm install -g generator-nglight
  • Next, create a directory for your project to live in.
  • 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.

  • Now run npm install and bower install to download dependencies
  • 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

Keywords

yeoman-generator

FAQs

Package last updated on 01 Jun 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.