Skip to content

Commit

Permalink
Convert to json instead of html
Browse files Browse the repository at this point in the history
  • Loading branch information
robinsk committed Jan 30, 2017
1 parent 3157b14 commit a798359
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions scripts/b-raml2html → scripts/b-raml2json
Expand Up @@ -6,13 +6,12 @@ var path = require('path');

var args = process.argv.slice(2);

if (args.length < 2) {
console.log('Must provide input RAML file and output HTML file');
if (args.length < 1) {
console.log('Must provide input RAML file');
process.exit(1);
}

var raml_file = path.resolve(args[0]);
var html_file = path.resolve(args[1]);

var api = raml.loadApiSync(raml_file);
console.log(JSON.stringify(api.toJSON(), null, 2));

0 comments on commit a798359

Please sign in to comment.