Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/files.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function ReadFile(filePath, filesJson, sortedBy) {
}

function walk(file) {
var newpath = path.join(filePath, file);
var newpath = path.posix.join(filePath, file);
var state = fs.statSync(newpath);

if (state.isDirectory()) {
Expand Down
5 changes: 3 additions & 2 deletions lib/html2md.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,16 @@ function Html2md(options) {
private = {
outputFileOptions: function(options) {
var outputfile = path.parse(options.file);
options['target'] = [outputfile.dir, outputfile.name + ".md"].join('/');

options['target'] = path.join(outputfile.dir, outputfile.name + ".md");
},

outputRemoteOptions: function(options) {
var remoteUrl = options.url;

if (options.target) {
var outputfile = path.parse(options.target);
options['targetHtml'] = [outputfile.dir, outputfile.name + ".html"].join('/');
options['targetHtml'] = path.join(outputfile.dir, outputfile.name + ".html");
} else {
var outputfileName = url.parse(remoteUrl).pathname.split('/').pop();
// console.log(outputfileName);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gitbook-summary",
"version": "1.1.3",
"version": "1.1.4",
"description": "A CLI to generate a summary from a given folder.",
"homepage": "http://imfly.github.io/gitbook-summary/",
"bin": {
Expand Down