Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
raml-generator
Advanced tools
Generate files from a RAML document and Handlebars templates.
npm install raml-generator --save
The module accepts a map of Handlebars templates, partials and helpers, and exports a function that can be used to generate files from a RAML object and user data. For an example module, take a look at the raml-javascript-generator.
Create the generator function from an object specification. The returned object accepts two parameters, the RAML object and user package information.
var fs = require('fs')
var generator = require('raml-generator')
module.exports = generator({
templates: {
'index.js': fs.readFileSync(__dirname + '/templates/index.js.hbs', 'utf8')
},
helpers: {
stringify: require('javascript-stringify')
}
}) //=> [Function]
Inside the Handlebars templates, the RAML interface is exposed as Handlebars data.
var baseUri = {{stringify baseUri}}
The user data is automatically provided as the Handlebars compile context.
A bin
script is provided for you to use with your custom generator. Just require raml-generator/bin
and pass in the generator function (from above), package information (package.json
) and process.argv
.
#!/usr/bin/env node
var bin = require('raml-generator/bin')
var generator = /* The generator function */
bin(generator, require('./package.json'), process.argv)
Apache License 2.0
FAQs
Generate files from a RAML document and template functions
The npm package raml-generator receives a total of 0 weekly downloads. As such, raml-generator popularity was classified as not popular.
We found that raml-generator demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.