Catalog npm
PACKAGE EXPLORERView in registry

212

npm

Functional/composable boilerplate generator for scaffolding modules

boilerplatecodeinitmodulenpmpackage
Versions collected1
Direct dependencies14From release 1.0.0
Last observed20 Oct, 18:57 UTC

README

Current package documentation

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

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
1.0.0Registry latest23 Jun 201614

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
bendrucker/212

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 18:57 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:d3c408a221616bf427c2d510559ab2ab7afcaf64dc7a9180968bbaba5f2a8030