Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

raml2md

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

raml2md - npm Package Compare versions

Comparing version 0.1.0 to 0.2.0

3

changelog.md

@@ -0,2 +1,5 @@

0.2.0 - July 10, 2014
- Synchronised code changes with raml2html
0.1.0 - June 12, 2014
- Initial release

21

lib/raml2md.js

@@ -9,5 +9,11 @@ #!/usr/bin/env node

var fs = require('fs');
var pjson = require('../package.json');
function _render(ramlObj, config, onSuccess) {
ramlObj.config = config;
// Register handlebar helpers
for (var helperName in config.helpers) {
if (config.helpers.hasOwnProperty(helperName)) {
handlebars.registerHelper(helperName, config.helpers[helperName]);
}
}

@@ -27,8 +33,10 @@ // Register handlebar partials

raml2obj.parse(source, function(ramlObj) {
ramlObj.config = config;
ramlObj.config.raml2HtmlVersion = pjson.version;
_render(ramlObj, config, onSuccess);
});
}, onError);
}
function parse(source, onSuccess, onError) {
var config = {
function getDefaultConfig() {
return {
'template': require('./template.handlebars'),

@@ -39,4 +47,6 @@ 'partials': {

};
}
parseWithConfig(source, config, onSuccess, onError);
function parse(source, onSuccess, onError) {
parseWithConfig(source, getDefaultConfig(), onSuccess, onError);
}

@@ -82,1 +92,2 @@

module.exports.parseWithConfig = parseWithConfig;
module.exports.getDefaultConfig = getDefaultConfig;
{
"name": "raml2md",
"description": "RAML to Markdown documentation generator",
"version": "0.1.0",
"version": "0.2.0",
"author": {

@@ -6,0 +6,0 @@ "name": "Kevin Renskers",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc