mirror of
https://github.com/nasa/openmct.git
synced 2025-06-06 01:11:41 +00:00
[Documentation] Switch to marked
Switch markdown generator to something more up-to-date, MissionControl/vista#21.
This commit is contained in:
parent
503bae661c
commit
55d52d060a
@ -15,7 +15,7 @@ GLOBAL.window = GLOBAL.window || GLOBAL; // nomnoml expects window to be define
|
|||||||
mkdirp = require("mkdirp"),
|
mkdirp = require("mkdirp"),
|
||||||
path = require("path"),
|
path = require("path"),
|
||||||
glob = require("glob"),
|
glob = require("glob"),
|
||||||
showdown = require("github-flavored-markdown"),
|
marked = require("marked"),
|
||||||
split = require("split"),
|
split = require("split"),
|
||||||
stream = require("stream"),
|
stream = require("stream"),
|
||||||
nomnoml = require('nomnoml'),
|
nomnoml = require('nomnoml'),
|
||||||
@ -79,7 +79,7 @@ GLOBAL.window = GLOBAL.window || GLOBAL; // nomnoml expects window to be define
|
|||||||
};
|
};
|
||||||
transform._flush = function (done) {
|
transform._flush = function (done) {
|
||||||
this.push("<html><body>\n");
|
this.push("<html><body>\n");
|
||||||
this.push(showdown.parse(markdown));
|
this.push(marked(markdown));
|
||||||
this.push("\n</body></html>\n");
|
this.push("\n</body></html>\n");
|
||||||
done();
|
done();
|
||||||
};
|
};
|
||||||
@ -89,6 +89,17 @@ GLOBAL.window = GLOBAL.window || GLOBAL; // nomnoml expects window to be define
|
|||||||
options['in'] = options['in'] || options.i;
|
options['in'] = options['in'] || options.i;
|
||||||
options.out = options.out || options.o;
|
options.out = options.out || options.o;
|
||||||
|
|
||||||
|
marked.setOptions({
|
||||||
|
renderer: new marked.Renderer(),
|
||||||
|
gfm: true,
|
||||||
|
tables: true,
|
||||||
|
breaks: false,
|
||||||
|
pedantic: false,
|
||||||
|
sanitize: true,
|
||||||
|
smartLists: true,
|
||||||
|
smartypants: false
|
||||||
|
});
|
||||||
|
|
||||||
glob(options['in'] + "/**/*.md", {}, function (err, files) {
|
glob(options['in'] + "/**/*.md", {}, function (err, files) {
|
||||||
files.forEach(function (file) {
|
files.forEach(function (file) {
|
||||||
var destination = file.replace(options['in'], options.out)
|
var destination = file.replace(options['in'], options.out)
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
"karma-phantomjs-launcher": "^0.1.4",
|
"karma-phantomjs-launcher": "^0.1.4",
|
||||||
"karma-requirejs": "^0.2.2",
|
"karma-requirejs": "^0.2.2",
|
||||||
"requirejs": "^2.1.17",
|
"requirejs": "^2.1.17",
|
||||||
"github-flavored-markdown": ">= 1.0.0",
|
"marked": "^0.3.5",
|
||||||
"glob": ">= 3.0.0",
|
"glob": ">= 3.0.0",
|
||||||
"split": "^1.0.0",
|
"split": "^1.0.0",
|
||||||
"mkdirp": "^0.5.1",
|
"mkdirp": "^0.5.1",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user