• This project
    • Loading...
  • Sign in

Shenlin / markdown-view

Itomix
Go to a project
Toggle navigation Toggle navigation pinning
  • Projects
  • Groups
  • Snippets
  • Help
  • Project
  • Activity
  • Repository
  • Pipelines
  • Graphs
  • Issues 0
  • Merge Requests 0
  • Wiki
  • Snippets
  • Network
  • Create a new issue
  • Builds
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Network
  • Compare
  • Branches
  • Tags
Switch branch/tag
  • markdown-view
  • bin
  • mdview
  • lintry's avatar
    调整路由,增加默认readme.md的处理 · 3cd7c44f
    3cd7c44f
    lintry authored 2018-01-09 11:11:42 +0800
mdview 342 Bytes
Raw Blame History Permalink
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
#!/usr/bin/env node

"use strict";

var target = process.argv[2];

if (!target) {
  console.error('target file is not found!');
  process.exit(1);
}

const mdview = new (require('../lib/mdview')),
  path = require('path');

const filename = path.resolve(process.cwd(), target);
var result = mdview.renderFile(filename);

console.log(result);