Initial commit
This commit is contained in:
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
dist
|
||||
node_modules
|
||||
19
package.json
Normal file
19
package.json
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"name": "aoe_techradar_node",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"create": "node ./scripts/create.js",
|
||||
"clean": "node ./scripts/clean.js",
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"author": "Tom Raithel <t.raithel@googlemail.com> (http://www.tomraithel.de)",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"async": "2.1.4",
|
||||
"front-matter": "2.1.1",
|
||||
"fs-extra": "2.0.0",
|
||||
"marked": "0.3.6"
|
||||
}
|
||||
}
|
||||
27
radar/v1/languages-and-frameworks/react.md
Normal file
27
radar/v1/languages-and-frameworks/react.md
Normal file
@@ -0,0 +1,27 @@
|
||||
---
|
||||
layout: post
|
||||
title: "React"
|
||||
ring: adopt
|
||||
---
|
||||
|
||||
Hier steht eine Einleitung über *React* - super "cool"
|
||||
|
||||
Hier noch ein [link](http://www.google.de) zu google
|
||||
|
||||
<!--except-->
|
||||
|
||||
Hier steht der Rest!
|
||||
|
||||
History
|
||||
-------
|
||||
|
||||
{% include
|
||||
history-entry.html
|
||||
ring="trial"
|
||||
date="2017-12-10"
|
||||
content="This is a history entry
|
||||
|
||||
- Foo
|
||||
- Bar
|
||||
"
|
||||
%}
|
||||
8
radar/v1/methods-and-patterns/foo.md
Normal file
8
radar/v1/methods-and-patterns/foo.md
Normal file
@@ -0,0 +1,8 @@
|
||||
---
|
||||
layout: post
|
||||
title: "Foo"
|
||||
ring: trial
|
||||
new: true
|
||||
---
|
||||
|
||||
Foo
|
||||
8
radar/v1/platforms-and-aoe-services/bar.md
Normal file
8
radar/v1/platforms-and-aoe-services/bar.md
Normal file
@@ -0,0 +1,8 @@
|
||||
---
|
||||
layout: post
|
||||
title: "Bar"
|
||||
ring: assess
|
||||
new: true
|
||||
---
|
||||
|
||||
Bar
|
||||
17
radar/v1/tools/grunt.md
Normal file
17
radar/v1/tools/grunt.md
Normal file
@@ -0,0 +1,17 @@
|
||||
---
|
||||
layout: post
|
||||
title: "Grunt"
|
||||
ring: hold
|
||||
new: true
|
||||
---
|
||||
|
||||
Hier steht was über *Grunt*
|
||||
|
||||
Hier noch ein [link](http://www.google.de) zu google
|
||||
|
||||
<!--except-->
|
||||
|
||||
Hier steht der Rest!
|
||||
|
||||
History
|
||||
-------
|
||||
24
scripts/clean.js
Normal file
24
scripts/clean.js
Normal file
@@ -0,0 +1,24 @@
|
||||
var fs = require('fs-extra');
|
||||
var async = require('async');
|
||||
var file = require('./file');
|
||||
|
||||
var distDir = file.distDir();
|
||||
|
||||
console.log('<<< start cleaning dist dir: ', distDir);
|
||||
|
||||
async.series([
|
||||
function(callback) {
|
||||
fs.ensureDir(distDir, callback);
|
||||
},
|
||||
function(callback) {
|
||||
fs.emptyDir(distDir, callback);
|
||||
}
|
||||
],
|
||||
function(err, results) {
|
||||
if (!err) {
|
||||
console.log('done cleaning dist dir >>>');
|
||||
} else {
|
||||
console.error(err);
|
||||
}
|
||||
}
|
||||
);
|
||||
21
scripts/create.js
Normal file
21
scripts/create.js
Normal 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
|
||||
})
|
||||
});
|
||||
10
scripts/file.js
Normal file
10
scripts/file.js
Normal file
@@ -0,0 +1,10 @@
|
||||
var path = require('path');
|
||||
|
||||
module.exports = {
|
||||
path: function(relativePath) {
|
||||
return path.resolve(__dirname, '..', relativePath)
|
||||
},
|
||||
distDir: function() {
|
||||
return this.path('dist');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user