-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmd_json.js
More file actions
43 lines (34 loc) · 736 Bytes
/
md_json.js
File metadata and controls
43 lines (34 loc) · 736 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// npm i md-to-json gulp-util
// https://github.com/PatternAtlas/md-to-json
let md2json = require('./md_to_json2');
var mdContent = `# Name
My name
# Attributes
- Color Vision
- Hair on Head
# MDCode
My name __is__ md:
- A
- B
- C
# End Tag
Text
# Empty
`
let json = md2json(mdContent);
console.log(json);
/*
This is an EXAMPLE gulpfile.js
You'll want to change it to match your project.
Find plugins at https://npmjs.org/browse/keyword/gulpplugin
*/
/*
var gulp = require('gulp');
//var uglify = require('gulp-uglify');
// https://gist.github.com/Raynos/8313682
gulp.task('md2json_task', function() {
return gulp.src('./static/md/docs.md')
.pipe(md2json())
.pipe(gulp.dest('.'));
})
*/