-
-
Notifications
You must be signed in to change notification settings - Fork 738
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1814962
commit ba955be
Showing
8 changed files
with
68 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// @ts-check | ||
|
||
"use strict"; | ||
|
||
module.exports = function wrapper(grunt) { | ||
grunt.initConfig({ | ||
"markdownlint": { | ||
"example": { | ||
"src": [ "*.md" ] | ||
} | ||
} | ||
}); | ||
|
||
grunt.registerMultiTask("markdownlint", function task() { | ||
const done = this.async(); | ||
import("../lib/markdownlint.mjs").then(({ "default": markdownlint}) => { | ||
markdownlint( | ||
{ "files": this.filesSrc }, | ||
function callback(err, result) { | ||
const resultString = err || ((result || "").toString()); | ||
if (resultString) { | ||
grunt.fail.warn("\n" + resultString + "\n"); | ||
} | ||
done(!err || !resultString); | ||
}); | ||
}).catch(done); | ||
}); | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// @ts-check | ||
|
||
"use strict"; | ||
|
||
const gulp = require("gulp"); | ||
const through2 = require("through2"); | ||
|
||
// Simple task wrapper | ||
gulp.task("markdownlint", function task() { | ||
return gulp.src("*.md", { "read": false }) | ||
.pipe(through2.obj(function obj(file, enc, next) { | ||
import("../lib/markdownlint.mjs").then(({ "default": markdownlint}) => { | ||
markdownlint( | ||
{ "files": [ file.relative ] }, | ||
function callback(err, result) { | ||
const resultString = (result || "").toString(); | ||
if (resultString) { | ||
console.log(resultString); | ||
} | ||
next(err, file); | ||
}); | ||
}).catch(next); | ||
})); | ||
}); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters