grunt-jspm-depcache

0.1.1 • Public • Published

grunt-jspm-depcache

Travis Code Climate

jspm depcache via Grunt in 10 seconds

Getting Started

This is a super simple plugin that lets you inject your JSPM dependencies into your config.js file for HTTP/2-enabled websites. You should be pretty familiar with JSPM (specifically the jspm depcache command) before using this plugin. To get started, install to your dev dependencies:

npm install grunt-jspm-depcache --save-dev

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

grunt.loadNpmTasks('grunt-jspm-depcache');

The depcache task

Overview

In your project's Gruntfile, add the depcache configuration:

grunt.initConfig({
    depcache: {
        your_target: [
            // your entry points go here
        ]
    },
});

Usage Examples

This is the equivalent of running jspm depcache main.js from your project root:

grunt.initConfig({
    depcache: {
        dist: 'main.js'
    }
});

The list of files can also be an array, e.g.

grunt.initConfig({
    depcache: {
        dist: ['main.js', 'another_module.js']
    }
});

The above is equivalent to running this from your project root:

$ jspm depcache main.js
$ jspm depcache another_module.js

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.

Release History

v0.1.1 - Handle errors thrown by JSPM v0.1.0 - Initial release

Readme

Keywords

Package Sidebar

Install

npm i grunt-jspm-depcache

Weekly Downloads

1

Version

0.1.1

License

MIT

Last publish

Collaborators

  • thatjavanerd