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.
helper-license
Advanced tools
Template helper for dynamically generating a basic, one-line license statement based on the given context, e.g. `Released under the MIT license`. Should work with any Handlebars, Lo-Dash, underscore, or any template engine that allows helper functions to
Template helper for dynamically generating a basic, one-line license statement based on the given context, e.g.
Released under the MIT license
. Should work with any Handlebars, Lo-Dash, underscore, or any template engine that allows helper functions to be registered.
npm i helper-license --save
Add a basic license statement to a document with verb:
{%= license() %}
//=> Released under the MIT license
{%= license({linkify: true}) %}
//=> Released under the [MIT](https://github.com/jonschlinkert/helper-license/blob/master/LICENSE-MIT) license
Add a basic license statement
var pkg = require('./package.json');
// handlebars
Handlebars.compile('{{license this}}')(pkg);
// lo-dash
_.template('<%= license({licenses: licenses}) %>', )
// verb
verb.render('{%= license({licenses: licenses}) %}', pkg);
// all result in:
//=> Released under the MIT license
Linkify:
_.template('<%= license({licenses: licenses, linkify: true}) %>', pkg);
//=> Released under the [MIT](https://github.com/jonschlinkert/helper-license/blob/master/LICENSE-MIT) license
This should work with any engine, here are a few examples to get you started
template.helper('license', require('helper-license'));
assemble.helper('license', require('helper-license'));
verb.helper('license', require('helper-license'));
var handlebars = require('handlebars');
handlebars.registerHelper('license', require('helper-license'));
Install dev dependencies:
npm i -d && npm test
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue
Jon Schlinkert
Copyright (c) 2015 Jon Schlinkert
Released under the MIT license
This file was generated by verb-cli on April 23, 2015.
FAQs
Template helper for adding a formatted license statement based on the license type in package.json.
The npm package helper-license receives a total of 0 weekly downloads. As such, helper-license popularity was classified as not popular.
We found that helper-license demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.