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

grunt-kobold

v0.9.0

Published

Grunt plugin for Kobold

Downloads

6

Readme

Grunt-Kobold

Grunt plugin for Kobold

Build Status Coveralls Coverage Code Climate Grade

NPM Version NPM License

NPM NPM

Coverage Report API Documentation

Gitter Support

Table of Contents

##Installation

Install this module with the following command:

npm install grunt-kobold

Add the module to your package.json dependencies:

npm install --save grunt-kobold

Add the module to your package.json dev-dependencies:

npm install --save-dev grunt-kobold

This plugin requires Grunt.

If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins.

Getting Started

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks('grunt-kobold');

The "kobold" task

Overview

In your project's Gruntfile, add a section named kobold to the data object passed into grunt.initConfig().

grunt.initConfig({
	kobold: {
		your_target: {
			// Target-specific Kobold options go here.
		},
	},
})

Options

options.config

Type: Object --optional--

Options that would be otherwise in the global config file. You can also require the js or json file instead of adding here all the configurations.

options.mochaArgs

Type: String[] --optional--

List of Mocha arguments that will be passed-through.

options.approvedFolder

Type: String --optional-- (default: 'approved')

Name of the approved folder where Images are defined as approved and how the build images should look like. This can also be the path to a folder.

options.buildFolder

Type: String --optional-- (default: 'build')

Name of the build folder that holds the most recent build images, taken to be compared to the approved images. This can also be the path to a folder.

options.highlightFolder

Type: String --optional-- (default: 'highlight')

Name of the highlight folder that will be used as the result folder, showing all the differences found during visual regression tests. This can also be the path to a folder.

options.configFolder

Type: String --optional-- (default: 'config')

Name of the config folder that describes image specific configurations the overwrite global configuration options that were given with the config property above. This can also be the path to a folder.

options.failOrphans

Type: Boolean --optional-- (default: false)

Defines if a test should fail when a previously approved images is missing from the current build images. This might happen if not all the screenshots could be taken due to an error, or it might simply be removed from the test-cases.

options.failAdditions

Type: Boolean --optional-- (default: false)

Defines if a test should fail when a previously unseen image appears in the build images. You might want to fail these tests to manually approve them; if they are not approved, then they will never be really compared.

options.testPath

Type: String --optional-- (default: current working directory)

Path to directory holding all the test-folders (i.e. approved, build, highlight, and config).

Usage Examples

Default Options

You can supply the configuration in the options object of a task:

grunt.initConfig({
	kobold: {
		ci: {
			options: {
				config: require('./config.js')
			}
		}
	}
})

Inline Options

You can supply the configuration inline in the options object of a task:

grunt.initConfig({
	kobold: {
		ci: {
			options: {
				config: {
					"outputBackgroundGreen": 255
				}
			}
		}
	}
})

Here another example, but with more options:

grunt.initConfig({

	kobold: {
  
		ci: {
			options: {
				config: {
					"outputBackgroundGreen": 255
				},
				
				highlightFolder: "result",
				
				failOrphans: true,
				failAdditions: true
			}
		}
	}
})

##Third-party libraries

The following third-party libraries are used by this module:

###Dependencies

###Dev-Dependencies

##License

The MIT License

Copyright 2015 Marcel Erz