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-ionic

v0.8.0

Published

A generator for the Ionic Framework

Downloads

23

Readme

Ionic Framework generator Build Status NPM version

Yeoman generator for creating Ionic hybrid mobile applications using AngularJS and Cordova - lets you quickly set up a project with sensible defaults and best practices.

Features

  • Scaffolding projects with Yeoman
  • Integrated with the ionic-cli
  • Browser LiveReload
  • Emulator LiveReload
  • Sass stylesheets compilation
  • HTML, JavaScript and CSS obfuscation and minification
  • Handles AngularJS dependency injection annotations
  • Icons and Splashscreens support
  • Cordova plugin management hooks
  • Environment Specific Configuration for AngularJS
  • Linting JavaScript
  • Running unit tests
  • Code coverage reporting with istanbul
  • Bundled ripple emulator

Usage

Make a new directory, and cd into it

mkdir my-ionic-project && cd $_

Run yo ionic, optionally passing an app name:

yo ionic [app-name]

Run grunt for building / compressing your Ionic app, grunt serve for a browser preview, and grunt serve:compress for a preview of the optimized application.

Upgrading

Make sure you've committed (or backed up) your local changes and install the latest version of the generator via npm install -g generator-ionic, then go ahead and re-run yo ionic inside your project's directory.

The handsome devil is smart enough to figure out what files he is attempting to overwrite and prompts you to choose how you would like to proceed. Select Y for overwriting your Gruntfile.js and bower.json to stay up-to-date with the latest workflow goodies and front-end packages.

Project Structure

Overview

├── Gruntfile.js            - Configuration of all Grunt tasks
├── package.json            - Dev dependencies and required Cordova plugins
├── bower.json              - Lists front-end dependencies
├── config.xml              - Global Cordova configuration
├── .gitignore              - Best practices for checking in Cordova apps
├── resources/              - Scaffolded placeholder Icons and Splashscreens
│   ├── ios/
│   ├── android/
├── app/
│   ├── index.html          - Main Ionic app entry point
│   ├── lib/                - Libraries managed by Bower
│   ├── scripts/            - Custom AngularJS Scripts
│   ├── styles/             - Stylesheets
│   ├── templates/          - HTML views
├── platforms/              - Targeted operating systems
├── plugins/                - Native plugins
├── hooks/                  - Cordova lifecycle hooks
├── merges/                 - Platform specific overrides
├── coverage/               - Istanbul reports
├── test/                   - Unit tests
│   ├── spec/
├── www/                    - Copied from app/ to be used by Cordova

Workflow Commands

grunt serve[:compress]

Run a local development server with built in filesystem watching support integrated with LiveReload so you can develop your Ionic app in a browser. Since this command uses the ionic-cli under the hood, you can specify any command line flags / options shown here.

$ grunt serve --consolelogs
$ grunt serve:compress

grunt platform:add:<platform>

Add a supported Cordova platform as a build target for this project.

$ grunt platform:add:ios
$ grunt platform:add:android

grunt plugin:add:<plugin>

Install a native Cordova plugin either by registry name or repository URL.

$ grunt plugin:add:https://github.com/driftyco/ionic-plugins-keyboard.git
$ grunt plugin:add:org.apache.cordova.device
$ grunt plugin:add:org.apache.cordova.network-information

grunt [emulate|run]:<target>

Either emulate your Ionic app inside a simulator or run it on a connected device, optionally enabling LiveReload support to supercharge your development speed and enhance productivity. Note: Any changes to native plugins will still require a full rebuild. This command also uses the ionic-cli under the hood, so these additional flags can be specified.

$ grunt emulate:ios --livereload
$ grunt emulate:ios --lc
$ grunt emulate:ios --target=iPad -lc
$ grunt emulate:android --consolelogs

$ grunt run:ios
$ grunt run:android

grunt compress

Run your Ionic application files located in app/ through the concatenation, obfuscation, and minification pipelines and write the optimized assets to the www/ directory, which allows them to be consumed by either the cordova or ionic command line tools for packaging.

grunt serve:compress

This runs grunt compress to optimize your Ionic app assets and then immediately launches a local development server so that you can preview the compressed application in a browser.

grunt build:<platform>

Build your Ionic application for the targeted platform.

$ grunt build:ios --device --release
$ grunt build:android --debug

grunt jshint

While running grunt serve or grunt emulate, the build system will be watching your filesystem for changes and linting your JavaScript files on the fly. However, you can invoke JSHint manually by using this command to spot check your Ionic app for linting errors.

grunt karma

Launches the configured karma test running framework using PhantomJS.

grunt coverage

Generates a static site containing code coverage reports for your unit tests using Istanbul.

grunt ripple

Launch the bundled Ripple emulator by first adding a platform via grunt platform:add:<platform> and then running this command.

Documentation

For a Getting Started guide, FAQ, and helpful tips, please see the documentation.

License

MIT License