grunt-single
v0.0.1
Published
base64 inline images/fonts/icons, reduce, compress = a single page, a single http request. but seriously.
Downloads
2
Readme
grunt-single
base64 inline images/fonts/icons, reduce, compress = a single page, a single http request. but seriously.
Notice
I needed to hack this together really fast for a quick experiment on pure base64 fonts/images/inline/data-uri with JST inline templates
and even automating the processing of stylesheets
to embed along with script
tags, producing a single http call. There are no tests, and this minimal doc. When I have time (or feel free as always to pull request) I'll be adding base64 fonts
, base64 images/icons
both inline and as a data-uri
s. I've only quickly tested it on this small project one setting so try below.
... Edward Hotchkiss.
Install
$ npm install grunt-single --save-dev
Gruntfile & Configuration
Gruntfile.js basic (and only) configuration params:
module.exports = function(grunt) {
'use strict';
// Gruntfile.js config
grunt.initConfig({
// "grunt-single" config
single: {
production: {
src : 'tmp/index.single.html',
dest : 'index.html'
}
}
});
grunt.loadNpmTasks('grunt-single');
grunt.registerTask('default', ['single']);
};
Usage
$ grunt