Base64 encode files.
A grunt task to base 64 encode files.
There are a number of good grunt plugins that do slightly more interesting things with base64 encoding like replace image URLs in your stylesheets with data URIs (grunt-image-embed, for instance). This task just wraps node.js's native base64 encoding capabilities into a grunt task; it's up to you to find something interesting to do with the output.
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. Once you're familiar with that process, you may install this plugin with this command:
npm install grunt-base64 --save-dev
In your project's Gruntfile, add a section named
base64 to the data object passed into
The base64 task does not take any options beyond which specifying source and destination files.
The base64 task takes a standard files configuration and transforms input files into base64-encoded outputs. It can optionally concatenate multiple inputs together:
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.
0.1.0: Initial release