JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 89580
  • Score
    100M100P100Q162203F
  • License MIT

JIT plugin loader for grunt.

Package Exports

  • jit-grunt

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (jit-grunt) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

jit-grunt 0.1 Build Status Built with Grunt

A JIT(Jast In Time) plugin loader for grunt.
Grunt load time is not slow plug-in even if many.

Before

grunt.loadNpmTasks('assemble');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-csslint');
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
...
$ grunt lint --verbose
...
Execution Time (2013-12-20 08:56:18 UTC)
loading tasks       7s  ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 88%
lint               1ms  0%
htmlhint:dev     875ms  ■■■■■■■■■■ 11%
csslint:dev       35ms  0%
jshint:dev        30ms  0%
Total 8s

After

require('jit-grunt')(grunt);
$ grunt lint --verbose

Execution Time (2013-12-20 08:57:09 UTC)
loading tasks    158ms  ■■■■■■■■■■■■ 13%
lint             105ms  ■■■■■■■■ 9%
htmlhint:dev     867ms  ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 73%
csslint:dev       29ms  ■■■ 2%
jshint:dev        37ms  ■■■ 3%
Total 1s

Have a pleasant grunt life!

Install

npm install jit-grunt --save-dev

Usage

Simple usage

require('jit-grunt')(grunt);

Auto mapping plugin name from task name, search order is

  • grunt-contrib-<task name>
  • grunt-<task name>
  • <task name>

Static mappings

Second parameter is static mappings <task name>: <plugin name>.

require('jit-grunt')(grunt, {
  bower: 'grunt-bower-task',
  sprite: 'grunt-spritesmith'
});

Example

https://github.com/shootaroo/jit-grunt/tree/master/example