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 🙏

© 2026 – Pkg Stats / Ryan Hefner

generator-an2

v1.0.2

Published

A generator for creating and scafolding AngularJS 2 basic application

Downloads

8

Readme

AngularJS 2 Generator

ngloveyo

AngualarJS 2.0 knew a tramadic changes over the pat nonths and for that matter, new concept have been introduced and one of them is the Component.

And so we have the normal way and it's by creating the file it self and make the needed addiction and configure everything with your app and then you install a live server that let you Launch your application i don't know about you but this process is really teades for me personally.So and because of that i've created AN2 Generator.

Usage :

In order to have a full complete vision please check out this article.

AN2 - Starter Article

Or just follow the steps bellow :

1 - Install Yo , Bower , Grunt-Cli and for our case we will use Gulp you will find a development version bundled with the end result but yu ned to instal it in your development machine :

 $ npm install -g bower  grunt-cli  gulp  yo

2 - Make yourself a working directory where you will scaffold your application, in direct or through command-line :

 $ mkdir dev-code 

3 - Simply Run the following command:

 $ yo an2

Notice :

In this version of the app we will assume that you will work using TypeScriptthat's why all the generated fiels will be in TypeScript

import {Component} from 'angular2/angular2';

@Component({
  selector : 'my-app',
  template : '<span>Hello world !</span>',
})

export class componentName {
  public hello : string = 'Hello !';
}

Sub-Generator :

For this matter we introduced the cmp sub generator, thi last will be responsible of creating the 3 different kind of files : .ts & .html & .css, and all that will be in a supported naming convention for th overall file name : componentName.Component.ts/html/css or just a plane naming componentName.ts\html\css. Using this command :

$ yo an2:cmp hero 

Where :

1 - an2 : is the name of the generator.

2 - cmp : is yeoman way to launh the sub generator, and in our case it's called : cmp and the : is critical.

Launching the Application :

AN2 Generator comes with pre-configuration files and we use live-server and the tsc the TypeScript compiler and it will run using the following commands

$ npm start #In order to launch the Liver-Server module.

And :

$ npm run tsc #In order to launch the TypeScript Compiler.

Changelog

Recent changes can be viewed on Github on the Releases Page

License

BSD license