Cut code in two.
Rashomon let you split code to comment and code description in one linear.
- line-reader(^0.2.4)
npm install rashomon
Prepare the target code you'd split.
(In this introduction, we use following test.js)
// this is comment
var Say = "YoHo";
Then, you can save comment and code separetely with Rashomon library.
var path = require('path');
var Rashomon = require('rashomon');
var target = path.join(__dirname, './test.js');
var result = Rashomon.parseCode(target);
console.log(result);
// [{"docsText":"this is comment", "codeText": "var Say = "YoHo";"}]