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-ngbp-module

v0.2.9

Published

Yeoman generator

Downloads

3

Readme

generator-ngbp-module

tests dependencies Coverage Status npm version

Getting Started

Yeoman - Install prerequisites

To install yeoman and the ngbp-module generator from npm, run:

npm install -g yo generator-ngbp-module

Create a new Angular Project

If you are creating a project from the start - create a new directory, make it your current working directory and scaffold out your initial app using this generator or just use the following...

mkdir <appname> && cd $_
yo ngbp-module

which scaffolds out a complete angular app structure for you:

./
├── karma/
│   └── karma-unit.tpl.js
├── src/
│   ├── app/
│   │   ├── app.js
│   │   └── app.spec.js
│   ├── less/
│   │   ├── bootswatch.less
│   │   ├── main.less
│   │   ├── style.css
│   │   └── variables.less
│   └── index.html
├── .bowerrc
├── .editorconfig
├── .gitignore
├── .jshintrc
├── .yo-rc.json
├── CHANGELOG.md
├── Gruntfile.js
├── ProtractorConfig.js
├── README.md
├── bower.json
├── package.json
└── vendor.config.js

Pass --init as an option to force the initialization of a new app. This should be used with caution as this may overwrite existing files.

Use --banner=<bannerfile> to specify a file which contains the string to be used as a banner in scaffolded files. This string is stored as config variable banner in .yo-rc.json file in project root directory.

Create a new Angular Module

Create the module using...

yo ngbp-module example

which scaffolds out a complete angular module structure for you:

src/app/example/
├── assets/
├── controllers/
│   └── example.controllers.js
├── directives/
│   ├── partials/
│   └── example.directives.js
├── e2e/
│   └── example.e2e.js
├── filters/
│   └── example.filters.js
├── services/
│   └── example.services.js
├── styles/
│   └── example.less
├── unit/
│   └── example.spec.js
├── partials/
│   └── example.tpl.html
└── example.module.js

You can always reverse this by:

yo ngbp-module:remove example

Controllers

Create a module controller by:

yo ngbp-module:controller test

which creates the following files


src/app/example/
├── controllers/
│   └── TestCtrl.js
└── unit/
    └── TestCtrl.spec.js
	

and updates src/app/example/controllers/example.controllers.js to include the newly created Controller as a dependency

Directives

Create a module directive by:

yo ngbp-module:directive test

which creates the following files


src/app/example/
├── directives/
│   └── Test.js
└── unit/
    └── Test.directive.spec.js
	

and updates src/app/example/directives/example.directives.js to include the newly created Directive as a dependency

Services

Create a module service by:

yo ngbp-module:service test

which creates the following files


src/app/example/
├── services/
│   └── Test.js
└── unit/
    └── Test.service.spec.js
	

and updates src/app/example/services/example.services.js to include the newly created Service as a dependency

Filters

Create a module filter by:

yo ngbp-module:filter test

which creates the following files


src/app/example/
├── filters/
│   └── Test.js
└── unit/
    └── Test.filter.spec.js
	

and updates src/app/example/filters/example.filters.js to include the newly created Filter as a dependency

Roadmap

All features, improvements and bugs are being tracked on the Trello Board Ngbp-module.

License

Copyright (c) 2015 John Brennan - MIT license.