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

212

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

212

Functional/composable boilerplate generator for scaffolding modules

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

212 Build Status

Functional/composable boilerplate generator for scaffolding modules

Install

$ npm install --save 212

Usage

var Boilerplate = require('212')
var boilerplate = Boilerplate({
  'package.json': function (data) {
    return {
      name: data.name,
      version: '0.0.0'
    }
  },
  '.travis.yml': function (data) {
    return {
      langugage: 'node_js',
      node_js: ['6']
    }
  }
})

boilerplate({name: 'my-great-package'}, function (err) {
  // Writes package.json, .travis.yml
})

API

Boilerplate(files) -> function

Returns a boilerplate function that can be called to write the configured boilerplate output.

files

Required
Type: object

An object containing key/value pairs of filenames and values. Values can either be:

  • A function that returns the file's data
  • An array that will be joined with newlines
  • Any other plain value type

Files with .json or .yml extensions will be automatically formatted. All other values will be stringified.

boilerplate(data, [options], callback -> undefined
data

Required
Type: object

Data to pass to file generator functions.

options
cwd

Type: string
Default: process.cwd()

The working directory to write boilerplate files to.

callback

Required
Type: function
Arguments: err

License

MIT © Ben Drucker

Keywords

FAQs

Package last updated on 23 Jun 2016

Did you know?

Socket

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.

Install

Related posts

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