From eb726725408d3aae05d68ca6a2901aadadf54fe7 Mon Sep 17 00:00:00 2001 From: Matt Huntington Date: Mon, 25 Jan 2016 11:10:48 -0500 Subject: [PATCH] better readme --- README.md | 52 +++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 49 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 5770087..e5e0a77 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,55 @@ # Grunt Task For Converting CML to HTML -## Getting Started +## Installation `npm install grunt-contrib-cml-html-converter` -## How Does It Work? +## What Does It Do? -It uses [this](https://www.npmjs.com/package/cml-html-converter) +This converts [cml](http://contextual-markup-language.org/) to HTML using [this npm package](https://www.npmjs.com/package/cml-html-converter) + +## Example Gruntfiles + +most basic: + +```javascript +module.exports = function(grunt) { + grunt.initConfig({ + cml: { + onefile: { + src: 'test.txt', + dest: 'result.html' + } + } + }); + grunt.loadNpmTasks('grunt-contrib-cml-html-converter'); +}; +``` + +using grunt-contrib-watch: + +```javascript +module.exports = function(grunt) { + grunt.initConfig({ + cml: { + onefile: { + src: 'test.txt', + dest: 'result.html' + } + }, + watch: { + options: { + livereload: { + port: 35729 + } + }, + all: { + files: ['test.txt'], + tasks: ['cml'] + } + } + }); + grunt.loadNpmTasks('grunt-contrib-cml-html-converter'); + grunt.loadNpmTasks('grunt-contrib-watch'); +}; +```