Add example, stop modifying files array, rename "styles".

This commit is contained in:
David Anson 2015-03-13 18:20:56 -07:00
parent d3e9f83e7c
commit 9917d7f2fb
7 changed files with 44 additions and 2 deletions

3
example/bad.md Normal file
View file

@ -0,0 +1,3 @@
#bad.md
#This file fails some rules.

3
example/good.md Normal file
View file

@ -0,0 +1,3 @@
# good.md
This file passes all rules.

21
example/standalone.js Normal file
View file

@ -0,0 +1,21 @@
"use strict";
var markdownlint = require("../lib/markdownlint");
var options = {
"files": [ "good.md", "bad.md" ]
};
// Uses result.toString for pretty formatting
markdownlint(options, function callback(err, result) {
if (!err) {
console.log(result.toString());
}
});
// Examines the result object directly
markdownlint(options, function callback(err, result) {
if (!err) {
console.dir(result, { "colors": true });
}
});