# grunt-jquery-toolbox

> collection of grunt tasks and optional opinionated configuration

Latest version **1.1.4** (published 2016-05-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install grunt-jquery-toolbox
pnpm add grunt-jquery-toolbox
yarn add grunt-jquery-toolbox
bun add grunt-jquery-toolbox
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.1.4 |
| Published | 2016-05-26 |
| First published | 2015-04-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=4 |
| Dependencies | 44 |
| Known vulnerabilities | 0 (+9 in 3 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Jimdo GmbH |
| Maintainers | partyschaum, xiphe |
| Keywords | jquery, grunt, helpers, tdd, demo |

## Links

- npm: https://www.npmjs.com/package/grunt-jquery-toolbox
- Repository: https://github.com/Jimdo/grunt-jquery-toolbox
- Issues: https://github.com/Jimdo/grunt-jquery-toolbox/issues
- npm.io page: https://npm.io/package/grunt-jquery-toolbox

## Dependencies (44)

- [del](https://npm.io/package/del.md) ^2.2.0
- [glob](https://npm.io/package/glob.md) ^7.0.3
- [bower](https://npm.io/package/bower.md) ^1.7.9
- [karma](https://npm.io/package/karma.md) ^0.13.22
- [postcss](https://npm.io/package/postcss.md) ^5.0.21
- [wiredep](https://npm.io/package/wiredep.md) ^4.0.0
- [requirejs](https://npm.io/package/requirejs.md) ^2.2.0
- [grunt-bump](https://npm.io/package/grunt-bump.md) 0.8.0
- [grunt-jscs](https://npm.io/package/grunt-jscs.md) ^2.8.0
- [grunt-sass](https://npm.io/package/grunt-sass.md) ^1.2.0
- [findup-sync](https://npm.io/package/findup-sync.md) ^0.4.1
- [grunt-karma](https://npm.io/package/grunt-karma.md) ~1.0.0
- [grunt-shell](https://npm.io/package/grunt-shell.md) ~1.3.0
- [autoprefixer](https://npm.io/package/autoprefixer.md) ^6.3.6
- [connect-less](https://npm.io/package/connect-less.md) ^0.3.1
- [grunt-thrall](https://npm.io/package/grunt-thrall.md) 0.0.4
- [jasmine-core](https://npm.io/package/jasmine-core.md) ^2.4.1
- [coffee-script](https://npm.io/package/coffee-script.md) ^1.10.0
- [grunt-wiredep](https://npm.io/package/grunt-wiredep.md) ^3.0.1
- [karma-jasmine](https://npm.io/package/karma-jasmine.md) ^1.0.2
- [grunt-injector](https://npm.io/package/grunt-injector.md) ^1.0.1
- [grunt-istanbul](https://npm.io/package/grunt-istanbul.md) ^0.7.0
- [karma-coverage](https://npm.io/package/karma-coverage.md) ^1.0.0
- [grunt-coveralls](https://npm.io/package/grunt-coveralls.md) ^1.0.1
- [karma-requirejs](https://npm.io/package/karma-requirejs.md) ^1.0.0
- [grunt-concurrent](https://npm.io/package/grunt-concurrent.md) ^2.3.0
- [grunt-autoprefixer](https://npm.io/package/grunt-autoprefixer.md) ^3.0.4
- [grunt-contrib-less](https://npm.io/package/grunt-contrib-less.md) ~1.3.0
- [phantomjs-prebuilt](https://npm.io/package/phantomjs-prebuilt.md) ^2.1.7
- [postcss-middleware](https://npm.io/package/postcss-middleware.md) ^1.1.2
- [grunt-contrib-watch](https://npm.io/package/grunt-contrib-watch.md) ~1.0.0
- [karma-spec-reporter](https://npm.io/package/karma-spec-reporter.md) 0.0.26
- [grunt-contrib-concat](https://npm.io/package/grunt-contrib-concat.md) ~1.0.1
- [grunt-contrib-cssmin](https://npm.io/package/grunt-contrib-cssmin.md) ^1.0.1
- [grunt-contrib-jshint](https://npm.io/package/grunt-contrib-jshint.md) ~1.0.0
- [grunt-contrib-uglify](https://npm.io/package/grunt-contrib-uglify.md) ~1.0.1
- [node-sass-middleware](https://npm.io/package/node-sass-middleware.md) ^0.9.8
- [grunt-contrib-connect](https://npm.io/package/grunt-contrib-connect.md) ^1.0.2
- [karma-chrome-launcher](https://npm.io/package/karma-chrome-launcher.md) ^1.0.1
- [karma-firefox-launcher](https://npm.io/package/karma-firefox-launcher.md) ^1.0.0
- [karma-phantomjs-launcher](https://npm.io/package/karma-phantomjs-launcher.md) ^1.0.0
- [grunt-update-contributors](https://npm.io/package/grunt-update-contributors.md) 0.0.1
- [karma-coffee-preprocessor](https://npm.io/package/karma-coffee-preprocessor.md) ^1.0.0
- [karma-html2js-preprocessor](https://npm.io/package/karma-html2js-preprocessor.md) ^1.0.0

## Alternatives

- [gamedig](https://npm.io/package/gamedig.md) — 29.3K weekly downloads
- [join-monster](https://npm.io/package/join-monster.md) — 12.8K weekly downloads
- [masked](https://npm.io/package/masked.md) — 5.5K weekly downloads
- [@comunica/actor-query-process-explain-logical](https://npm.io/package/@comunica/actor-query-process-explain-logical.md) — 4.7K weekly downloads
- [@veracity/vui](https://npm.io/package/@veracity/vui.md) — 4.6K weekly downloads

## Recent versions

- 1.1.4 (latest) — 2016-05-26
- 1.1.3 — 2016-05-25
- 1.1.2 — 2016-03-21
- 1.1.1 — 2016-02-19
- 1.1.0 — 2016-01-06
- 1.0.0 — 2016-01-04
- 0.1.9 — 2015-07-20
- 0.1.8 — 2015-07-09
- 0.1.7 — 2015-06-11
- 0.1.6 — 2015-06-03
- 0.1.5 — 2015-06-02
- 0.1.4 — 2015-06-02
- 0.1.3 — 2015-06-02
- 0.1.2 — 2015-06-01
- 0.1.1 — 2015-06-01
- … 3 more at https://npm.io/package/grunt-jquery-toolbox/versions

## README

grunt-jquery-toolbox
=====================

[![Build Status](https://travis-ci.org/Jimdo/grunt-jquery-toolbox.svg?branch=master)](https://travis-ci.org/Jimdo/grunt-jquery-toolbox)
[![Dependency Status](https://david-dm.org/Jimdo/grunt-jquery-toolbox.svg)](https://david-dm.org/Jimdo/grunt-jquery-toolbox)

Collection of grunt tasks and optional opinionated configuration
for development of jquery plugins.


Install
-------

```sh
npm install grunt grunt-cli --save-dev
npm install grunt-jquery-toolbox --save-dev
```

Use
---

```js
// Gruntfile.js
module.exports = function(grunt) {
  'use strict';

  grunt.initConfig({
    pkg: grunt.file.readJSON('package.json'),
    jqueryToolbox: { /* see config */ }
    /* project specific configuration here */
  });

  /* load jquery-toolbox collection
     see Included 3rd party tasks */
  grunt.loadNpmTasks('grunt-jquery-toolbox');

  /* custom tasks and hooks */
  grunt.registerTask('default', ['test']);
  grunt.registerTask('build:after', function() {
    grunt.log.ok('work complete!');
  });
};
```


Tasks
-----

Depending on the tasks added by [addTasks](#use) these grunts are available
in the project.

```sh
#see this list by using
grunt --help
```

### $ `grunt test`

Run the tests.

__Environment Variables__:
 - `KARMA_BROWSERS` overwrite browsers for unit tests (default: PhantomJs,Chrome,Firefox)
 - `KARMA_REPORTERS` overwrite reporters for unit tests (default: progress)

__Options__:
 - `--browsers` change browsers for current suite(s)
 - `--reporters` change reporters for current suite(s)
 - `--no-coverage` disable coverage reports and instrumentation (useful for debugging)
 - `--no-jshint` disable jshint (useful for debugging)
 - `--watch` tdd style

### $ `grunt demo`
Serve demo application

__Environment Variables__:
 - `DEMO_PORT` change port                  (default: 8000)
 - `LIVERELOAD_PORT` change livereload port (default: 35729)

__Options__:
 - `--port` change port of current task
 - `--livereload-port` change livereload port

### $ `grunt coverage`
Serve coverage report, requires `grunt test:unit` to have been run once.

__Environment Variables__:
 - `COVERAGE_PORT` change port              (default: 7000)
 - `LIVERELOAD_PORT` change livereload port (default: 35729)

__Options__:
 - `--port` change port
 - `--livereload-port` change livereload port

### $ `grunt build[:watch]`
Concatenate, annotate and minify JavaScript and less files
Optionally watch the `src` files and rebuild on change

### $ `grunt release[:level]`
Run tests, (if successful) bump version build project, commit changes and push to origin


Default project structure
-------------------------

```
 ┌ demo/
 │ └ index.html
 ├ dist/
 ├ src/
 │ ├ js/
 │ │ ├ *.js (project related js files)
 │ ├ less/
 │ │ └ *.less (project related less files)
 │ └ partials/
 │   └ *.html (views for directives)
 ├ test/
 │ └ unit/
 │   ├ SpecHelper.js|coffee (test setup stuff)
 │   └ *Spec.js|coffee (unit test files)
 ├ .jshintrc (optional)
 ├ bower.json (optional)
 ├ package.json
 └ Gruntfile.js|coffee
```

This is customizable via the [config](#config)


Config
------

Values are defaults or explanations.

```js
// Gruntfile.js
module.exports = function(grunt) {
  'use strict';

  grunt.initConfig({
    jqueryToolbox: {
        /* specify the preconfigured tasks that
         should be used in the project */
      tasks: [
        'build',
        'coverage',
        'coveralls',
        'demo',
        'release',
        'tdd',
        'test'
      ],

      // whether or not the author in package.json should be set to the
      // contributor with the most commits
      dynamicAuthor: false,

      // customize the demo/test environment files
      envFilter: function(env) { return env; },

      // customize project structure
      files: {
        src: {
          js: [
            'src/js/helper.module.js'
          ],
          less: [
            'src/less/**/*.less'
          ]
        },
        // additional vendor files for tests and demos that
        // won't be shipped within dist
        vendor: {
          js: {
            top: [],
            jqueryPlugins: [],
            bottom: []
          },
          css: [],
        },
        test: {
          unit: [
            'test/unit/SpecHelper.+(js|coffee)',
            'test/unit/**/*Spec.+(js|coffee)'
          ]
        },
        demoEnvFolder: 'demo/',
        distFolder: 'dist/'
      },

      // custom path for your jshintrc
      jshintrc: '.jshintrc',

      // how much commits make a maintainer?
      maintainersThreshold: 15,

      // custom middleware for demo server
      // can also be an array of middleware
      middleware: {
        demo: function(req, res, next) { next(); }
      },

      // banners an wraps for generated dist files (can be paths or strings)
      template: {
        banner: 'lib/templates/banner.tpl',
        bannerMin: 'lib/templates/bannerMin.tpl',
        wrapTop: 'lib/templates/wrapTop.tpl',
        wrapBottom: 'lib/templates/wrapBottom.tpl'
      }
    }

    /* additional configuration ... */
  });

  /* rest of gruntfile ... */
};
```


Custom tasks and hooks
----------------------

Register custom tasks and or setup before the added tasks run.

```js
// Gruntfile.js
module.exports = function(grunt) {
  'use strict';

  grunt.initConfig({ /* ... */ });

  /* initiation of tasks ... */

  /* add any custom tasks */
  grunt.registerTask('sayYolo', function() {
    console.log('YOLO!');
  });

  /* hook it into tooling tasks ones.
     this will be called before all other release tasks */
  grunt.registerTask('release:before', ['sayYolo']);
};
```

### Hooks

 - test:before
 - test:unit:before
 - test:after
 - test:unit:after
 - tdd:before
 - tdd:unit:before
 - demo:before
 - coverage:before
 - build:before
 - build:after
 - release:before
 - release:after


Included 3rd party tasks
------------------------

 - [grunt-bump](https://github.com/vojtajina/grunt-bump)
 - [grunt-concurrent](https://github.com/sindresorhus/grunt-concurrent)
 - [grunt-contrib-concat](https://github.com/gruntjs/grunt-contrib-concat)
 - [grunt-contrib-connect](https://github.com/gruntjs/grunt-contrib-connect)
 - [grunt-contrib-jshint](https://github.com/gruntjs/grunt-contrib-jshint)
 - [grunt-contrib-less](https://github.com/gruntjs/grunt-contrib-less)
 - [grunt-contrib-uglify](https://github.com/gruntjs/grunt-contrib-uglify)
 - [grunt-contrib-watch](https://github.com/gruntjs/grunt-contrib-watch)
 - [grunt-coveralls](https://github.com/pimterry/grunt-coveralls)
 - [grunt-istanbul](https://github.com/taichi/grunt-istanbul)
 - [grunt-karma](https://github.com/karma-runner/grunt-karma)
 - [grunt-npm](https://github.com/Xiphe/grunt-npm/)
 - [grunt-shell](https://github.com/sindresorhus/grunt-shell)


LICENSE
-------

> The MIT License
>
> Copyright (c) 2014 Jimdo GmbH http://jimdo.com
>
> Permission is hereby granted, free of charge, to any person obtaining a copy
> of this software and associated documentation files (the "Software"), to deal
> in the Software without restriction, including without limitation the rights
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
> copies of the Software, and to permit persons to whom the Software is
> furnished to do so, subject to the following conditions:
>
> The above copyright notice and this permission notice shall be included in
> all copies or substantial portions of the Software.
>
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
> THE SOFTWARE.

---
_Source: https://npm.io/package/grunt-jquery-toolbox · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
