npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

generator-nglight

v0.1.9

Published

--- A lightweight Angular yeoman generator.

Downloads

13

Readme

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.

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