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

i2g

v1.3.0

Published

Generator to create Ionic 2 Pages/Components and Angular 2 Components

Readme

Ionic 2 Generator

Build Status downloads per day

===================

Welcome to the Ionic 2 Generator! You might wonder why this is called an Ionic 2 generator when it contains Angular 2 components generations as well, but fret not all your questions shall be answered!

This generator is specialised for Ionic 2 application projects. I.e. you created your project using ionic start myApp blank --v2 --ts and are too lazy to create the pages files or the components.

i2g generator comes to the rescue!

Installation

Simply run

npm install -g i2g

to have the generator globally available and voila! Creating Ionic pages and components has never been so easy!

Available commands

This generator is very simple to use, and might be to the liking of those used to the famous artisan commands.

For any help while using the generator, just run

i2g --help

to see the available commands and what they do

Creating Ionic 2 Page Files

Generating the files has never been easier! Simply run

i2g make:page PAGE_NAME

and the files will be created in app/pages/PAGE_NAME/

You could even pass the --nav to have an Ionic 2 page wired up with the Ionic 2 NavController, like so:

i2g make:page PAGE_NAME --nav

Page files include:

  • page_name.ts
  • page_name.page.html
  • page_name.scss

Creating Angular 2 Components

Angular 2 component files generation is pretty much the same, run

i2g make:component COMPONENT_NAME

and it will automagically create the component files in app/components/COMPONENT_NAME/

You could even pass the --oninit to have an Component extending the Angular 2 OnInit method, which provides a component on-load method, like so:

i2g make:component COMPONENT_NAME --oninit

Component files include:

  • component_name.component.ts
  • component_name.html
  • component_name.scss

Creating Angular 2 Services

Angular 2 service files is similar

i2g make:service SERVICE_NAME

and it will automagically create the component files in app/services/SERVICE_NAME.service.ts

Contribution

If you liked this generator and want to propose some improvements, feel free to send a pull request!

Just git clone the repository and run npm install

Make sure to have eslint and editorconfig plugins installed to conform to the format and codestyle of the project