- package.json is used for context
- the
options
object can be used to extend the context (package.json) passed to templates - Banner templates are just Lo-Dash/Underscore templates. Anything that works with those libs should work in banner templates.
{%= apidocs('index.js') %}
Pass a file path to the main export:
const banner = require('add-banner');
console.log(banner('./index.js'));
Results in the string:
/*!
* banner-cli <https://github.com/jonschlinkert/banner-cli>
*
* Copyright (c) 2014-present Jon Schlinkert.
* Licensed under the MIT license.
*/
module.exports = () => {};
$ add-banner --help
Usage: add-banner [options] <pattern>
Options:
-h, --help output usage information
-V, --version output the version number
-t, --template [filepath] path to template file