forked from dsccommunity/SharePointDsc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
24 lines (23 loc) · 788 Bytes
/
gulpfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
var gulp = require("gulp");
var concat = require("gulp-concat");
var through2 = require("through2");
var markdownlint = require("markdownlint");
gulp.task("test-mdsyntax", function task() {
return gulp.src("Modules/SharePointDsc/DSCResources/**/*.md", { "read": false })
.pipe(through2.obj(function obj(file, enc, next) {
markdownlint(
{
"files": [ file.path ],
"config": require("./.markdownlint.json")
},
function callback(err, result) {
var resultString = (result || "").toString();
if (resultString) {
file.contents = new Buffer(resultString);
}
next(err, file);
});
}))
.pipe(concat("markdownissues.txt", { newLine: "\r\n" }))
.pipe(gulp.dest("."));
});