Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

base-package-json

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

base-package-json

Basic package.json readable stream

latest
Source
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

base-package-json

NPM version build status Test coverage Downloads js-standard-style

Basic package.json readable stream. Sets the minimum amount of properties to satisfy npm. Easy to extend, useful for code generators.

Installation

$ npm install base-package-json

Usage

const package = require('base-package-json')
const through = require('through2')

package({ name: 'my-package' })
  .pipe(through({ objectMode: true }, (obj, enc, cb) => {
    obj.dependencies.rimraf = '2.4.3'
    obj.description = 'My great description'
    cb(null, obj)
  }))

API

package(opts)

Create a blank package.json. By default it sets name, version, scripts, dependencies and devDependencies.

The following options are accepted:

  • name: the module name. Defaults to <name>.
  • version: the module version. Defaults to 1.0.0.
  • private: if the module is publishable. It should be set to false for applications. Defaults to undefined (e.g. will not set).

See Also

License

MIT

Keywords

read

FAQs

Package last updated on 30 Sep 2015

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