Transform HTML files to Markdown in a Grunt task
This Grunt task plugin transforms the given HTML files to the Markdown format.
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-html2md --save-dev
In your project's Gruntfile, add a section named
html2md to the data object passed
Options are passed to the
to-markdown handler, please see
https://github.com/domchristie/to-markdown for further details
GitHub Flavoured Markdown
In this example, the default options are used, as there aren't any at the moment.
All the files matching the
legacy/*.html selectors will be used
as HTML sources, which will be converted to Markdown files placed in the same folder
as the given source file.
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.
Unit tests are done with Nodeunit.
npm installnpm run lintnpm test
Licensed under the MIT license.