Skip to content

Commit

Permalink
Update the api of fetching a html coverted from markdown file.
Browse files Browse the repository at this point in the history
  • Loading branch information
licoliu committed Sep 2, 2016
1 parent 5f61fea commit 697de98
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 8 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"group": "atom.lico",
"artifact": "pomy",
"name": "pomy",
"version": "1.4.2",
"version": "1.4.3",
"title": "pomy - a software project management and comprehension tool",
"description": "Based on the concept of a project object model (POM), POMY can manage a project's build, reporting and documentation from a central piece of information.",
"main": "",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"group": "atom.lico",
"artifact": "pomy",
"name": "pomy",
"version": "1.4.2",
"version": "1.4.3",
"title": "pomy - a software project management and comprehension tool",
"description": "Based on the concept of a project object model (POM), POMY can manage a project's build, reporting and documentation from a central piece of information.",
"main": "",
Expand Down
2 changes: 1 addition & 1 deletion pomy.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"group": "com.atomunion",
"artifact": "pomy",
"version": "1.4.2",
"version": "1.4.3",
"name": "pomy",
"title": "pomy - a software project management and comprehension tool",
"description": "Based on the concept of a project object model (POM), POMY can manage a project's build, reporting and documentation from a central piece of information.",
Expand Down
2 changes: 1 addition & 1 deletion site/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "pomy",
"description": "pomy.",
"version": "1.4.2",
"version": "1.4.3",
"author": {
"name": "lico",
"email": "[email protected]"
Expand Down
2 changes: 1 addition & 1 deletion site/plugins/docs/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "docs",
"description": "jsdoc.",
"version": "1.4.2",
"version": "1.4.3",
"author": {
"name": "lico",
"email": "[email protected]"
Expand Down
17 changes: 16 additions & 1 deletion site/plugins/markdown/plugins/core/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,11 @@ var Kore = function() {
title = req.body.title,
id = req.body.id,
json_response = {
data: '',
id: null,
name: "",
title: "",
mtime: null,
data: "",
error: false
}

Expand All @@ -151,11 +155,22 @@ var Kore = function() {
if (!unmd && pathname) {
unmd = fs.readFileSync(pathname, 'utf8');
}

if (pathname && fs.existsSync(pathname)) {
var stat = fs.statSync(pathname);
if (!stat.isDirectory()) {
json_response.id = stat.ino; //stat.ctime.getTime(),
json_response.name = path.basename(pathname);
json_response.title = pathname;
json_response.mtime = stat.mtime;
}
}
}

var html = _getHtml(unmd)

json_response.data = html

res.json(json_response)
},
downloadHtml: function(req, res) {
Expand Down
3 changes: 1 addition & 2 deletions tasks/lifecycle/default/dependancy.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ gulp.task('dependancy:npmpomy', ['dependancy:npm'], function() {
.pipe(gulp.dest(root));
});

gulp.task('dependancy:bower', function(cb) {
gulp.task('dependancy:bower', ['dependancy:npmpomy'], function(cb) {
var pomy = global.getPomyPath();

var directory = pomy + 'bower_components';
Expand Down Expand Up @@ -121,7 +121,6 @@ gulp.task('dependancy', ['validate'], function(cb) {
}

args.push(global.getCommandPath('gulp'));
args.push('dependancy:npmpomy');
args.push('dependancy:bower');

var dependancy = spawn(command, args, {
Expand Down

0 comments on commit 697de98

Please sign in to comment.