This is a fork of grunt-html-snapshot
The only difference between this fork and the parent repository by cburgdorf is this version has an up-to-date phantomjs-prebuilt dependency, and the bridge script uses the new "system.args" way of getting to phantomjs's command line arguments. It is just a compatibility release, and works as a drop-in replacement for minimal hassle.
grunt-html-snapshot
Makes it easy to provide html snapshots for client side applications so that they can be indexed by web crawlers
Getting Started
This plugin requires Grunt ~0.4.0
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-html-snapshot --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt;
htmlSnapshot task
Run this task with the grunt htmlSnapshot
command.
configuring the htmlSnapshot task
grunt;
Release History
- 0.6.1 - trigger warnings with grunt.warn(msg, 6) instead of grunt.log(msg)
- 0.6.0 - Provide a function hook for the file name sanitization (by @mrgamer)
- 0.5.0 - Add option to set cookies. Also fixed a bug for scenarios where multiple instances of the tasks are being used in parallel.
- 0.4.0 - Add more sophisticated replace functionality to transform the html output (thanks to @okcoker)
- 0.3.0 - Escape tabs & introduced new option bodyAttr to place a custom attribute on the body
- 0.2.1 - fixed a bug where quotes where missing from the html
- 0.2.0 - added option to remove script tags from the output
- 0.1.0 - Initial release