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

karma-addgears-launcher

v0.1.0

Published

A Karma plugin. Karma Launcher for Addgears.

Readme

Karma Addgears Launcher

Addgears is the application which provides a set of useful tools for e-commerce. Karma Addgears Launcher enables unit tests in Addgears using a Karma test runner.

Addgears is based on the node-webkit and is highly customizable. Addgears extension is just a set of node.js modules and HTML pages. Addgears package along with grunt-addgears delivers Addgears integration with node.js: scripting, access to Addgears API and grunt tasks to automate installation, updates and resource packaging. These tools warrant that anyone may take existing node.js packages, CSS, Javascript and HTML files and reuse them to create rich desktop application running on node-webkit platform.

Still, to make better use of node-webkit and Addgeras APIs, a closer integration may be desired. Karma Addgears Launcher provides all the plumbing necessary to test and develop applications directly in Addgears, using popular open source Karma test runner.

Installation

Install the package using npm command:

npm install karma-addgears-launcher --save-dev

To make developer's path smoother, you may whish to install addgears package, grunt-cli and grunt-addgears first. Karma Addgears Launcher comes with the examples directory, containing simple project setup including Karma and Addgears configuration files, useful grunt configuration and mocha test.

Configuration

Configuring Addgears Launcer is as simple as adding "Addgers" to the browsers list in karma.conf.js:

// start Addgears browser
        browsers: ["Addgears"],   

With this configuration, upon karma start, Karma tests runner starts Addgers application and opens the test in a separate iframe. In this iframe the common node-webkit environment with both node.js modules and HTML DOM becomes accessible.

To debug Javascript files just connect to Addgears on the remote port (http://localhost:9222/), or modify standard node-webkit configuration file package.json in app.nw subdirectory of the Addgears installation directory:

  .........
    "window": {
        // show toolbar with developer tools
        "toolbar": true
    }, 

As Karma test is loaded in a separate domain (e.g. http://localhost:9876), karma tests don't have the direct access to resources loaded to Addgears. To gain access to Addgears resources, the test should load resources to the Karma tests domain. The lib/boot.js file in Karma Launcher subdirectory provides InitAddgears class with install and boot methods (to load resources and provide the access accordingly):

  InitAddgears
  .install({ // loads update asynchronousely
      update:"c:/tmp/update", // directory containing the update bundle
      keepUpdate:true // don't remove update (after applied
  })
  .then(function () {
      return InitAddgears.boot(); // boot before access to _Addgears_ API
  })
  .then(function () {
      assert.equal(!!window["Addgears"], true); // now _Addgears_ object is available
      done();
  });

Other useful tools

To make better use of Addgears, other tools could be useful as well. Consider a simple setup, found in the example directory:

 cd examples
 npm install

Grunt tasks from addgears package (grunt.loadNpmTasks('addgears')) add helpful functionality. Download current Addgear bundle using grunt downloadUpdate. Unzip and load update to the Karma test domain running grunt unzip and grunt addgearsApplyUpdate accordingly. To open later page on Karma test domain run grunt addgearsRun .

// from examples/Gruntfile.js configuration
   downloadUpdate:{
       main:{
           path:'update.zip'                
       }
   },       
   addgearsApplyUpdate:{
       origin:{
           options:{
               updateOrigin:"http://localhost:9876"
           },
           src:["c:/tmp/update"] 
       }
   },
   addgearsRun:{
       origin:{
           page:'[email protected]',
           options:{
               command: [
               "-httpServerRoot", ".",
               "-httpPort", 9876,                    
               "-openUrl","http://localhost:9876/page.html?page=pages/pricer/main.html"
               ]
           }                
       }
   },

Gruntfile.js also contains unzip and karma grunt tasks to unzip update bundle and start_Karma_ tests runner:

        unzip:{
            update: {
                src: ['update.zip'],
                dest: 'c:/tmp'
            }
        },                                     
        karma: {
            options: {
                configFile: 'karma.conf.js'
            },            
            addgears:{
                singleRun: false,
                autoWatch:true,                
                browsers: ['Addgears']
            }            
        }

License

This package is licensed under MIT license. Addgears is licensed separately. To use it you must agree with the terms and conditions first.