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

n-steps

v1.1.1

Published

Angular 1.x component for creating steps ex. a form wizzard

Downloads

3

Readme

nSteps

Build Status Coverage Status

Angular 1.x component for creating steps ex. form wizzards. Please notice that current version only supports one single instance.

Screencapture GIF

Getting started

npm install n-steps --save

Inject module dependency

angular.module('app', ['nSteps']);

Usage

The component comes with several directives: n-add-content-create, n-add-content-reset, n-add-content-remove and n-add-content-container

  1. Init
<div class="container" n-steps-container></div>
...
.controller('demoController', function(NStepsService) {
    var vm = this;
    vm.steps = [
        {
            name: 'Step 1',
            template: 'demo-stepOne.html'
        },
        {
            name: 'Step 2',
            template: 'demo-stepTwo.html'
        },
        {
            name: 'Step 3',
            template: 'demo-stepThree.html'
        }
    ];
    
    activate();

    function activate() {
        NStepsService.init(vm.steps);
    }
});
  1. Add controls to change the steps
<button type="button" class="button" n-steps-change-step index="previous">Forrige</button>
<button type="button" class="button" n-steps-change-step index="2">Step 3</button>
<button type="button" class="button" n-steps-change-step index="next">Næste</button>
  1. Show the navigation
<div n-steps-nav>Step {{nSteps.nav.currentIndex + 1}} / {{nSteps.nav.totalSteps}}</div>

Development

Installation

This will install all you need to get started. Besides the dependencies in package.json, it will automatically install jspm for you globally and install jspm dependencies too.

npm install

What does this include

  • Semantic-relase
  • Travis CI
  • Typescript
  • Commitizen
  • ng-annotate (adds and removes AngularJS dependency injection annotations)
  • Inline Angular templates
  • validate-commit-msg
  • Karma / Jasmine testing environment
  • Lite-server (live-reload)
  • SCSS environment with autoprefixer
  • SystemJS (SFX)
  • Gulp
  • Source maps

Lite-server

Lite-server is configured to serve, index.html placed in the root of your component with live-reload for specified environment.

Serve dev-environment

To serve up the un-minified code run following command. This command starts up lite-server and gulp watch task which gives you live-reload when ./dist/component.css, ./dist/component.js or ./index.html is changed:

npm run serve:dev

Serve production-environment

To serve minified & bundled code run the following command. This command starts up lite-server and gulp watch task which gives you live-reload when ./dist/component.css, ./dist/component.min.js or ./index.html is changed.

npm run serve:build

SystemJS (SFX)

SystemJS is configured to build a self-executing bundle. Consumers of your components are therefore NOT required to use SystenJS. Read more

Commitizen (optional)

To use commitizen use following command. Commitizen is optional and if you don't wanna use commitizen you can just commit as you're used to. You will just need to follow the AngularJS commit message guidelines. You can read more about commitizen here

npm run commit

validate-commit-msg

Validates commit messages on each commit according to the AngularJS commit message guidelines

Build

To build your component run following command. This command will minify your css, compile (es2015), ensures to annotate your angular dependencies, inline all your templates, bundle and minify your javascript.

gulp build

Testing

Single run

npm run test

Watch

npm run karma