grunt-manifest-generator
this tool will scan all the html files, and get all the images, css, js, html to generator the manifest file.
Getting Started
This plugin requires Grunt ~0.4.1
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-manifest-generator
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt;
You can run the testcase. change you path to ./node_modeules/grunt-manifest-generator/, and run grunt. You could see the result file ./output/test.manifest file was created! The ./Gruntfile.js has the base function of this task, so you could use it as that. If you have any question, you can contact me at sina weibo: http://weibo.com/ginano
The "manifest-generator" task
Overview
In your project's Gruntfile, add a section named manifestGenerator
to the data object passed into grunt.initConfig()
.
'use strict'; module { grunt; // Actually load this plugin's task(s). grunt; grunt;};
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
2013-8-23 0.1.0 create the plugin
2013-10-12 0.1.1 add the extraFiles option for add some extra files to the manifest file. optimize the rule of geting image files from htmlcontent.
2013-11-25 0.1.2-0.1.3 add some comments for the sourecode. change the usage of lib/util.