Initial commit

This commit is contained in:
Tom Raithel
2017-01-20 07:23:25 +01:00
commit 37ae2943d5
9 changed files with 136 additions and 0 deletions

21
scripts/create.js Normal file
View File

@@ -0,0 +1,21 @@
var fs = require('fs-extra');
var frontmatter = require('front-matter');
var marked = require('marked');
var file = require('./file');
var fileName = file.path('radar/v1/tools/grunt.md');
fs.readFile(fileName, 'utf8', function(err, data) {
if (err) throw err;
var item = frontmatter(data);
var html = marked(item.body);
console.log(item.attributes);
console.log(html);
fs.outputFile(file.distDir() + '/test.html', html, function (err) {
console.log(err) // => null
})
});