Giter Site home page Giter Site logo

fi3ework / danger-plugin-node-dependencies Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pgoudreau/danger-plugin-node-dependencies

0.0 2.0 0.0 744 KB

Keep dependencies as low as possible.

License: MIT License

JavaScript 4.63% TypeScript 95.37%

danger-plugin-node-dependencies's Introduction

danger-plugin-node-dependencies

Keep dependencies as low as possible.

Warns or fails on new dependencies in package.json.

Usage

Install

npm install --save-dev danger-plugin-node-dependencies

At a glance

// dangerfile.ts
import { warnDependencies, failDependencies } from 'danger-plugin-node-dependencies'

// Warn of all dependencies added since the last commit
warnDependencies()

// Warn on new dev dependencies, fail on new dependencies
warnDependencies({ devDependencies: true })
failDependencies({ dependencies: true })

Sample output


Added dependencies:
  • dotenv install size
  • helmet install size
Added dev dependencies:
  • @types/dotenv install size
  • @types/helmet install size
  • eslint install size

API

danger-plugin-node-dependencies exports two functions:

  • warnDependencies(options)
  • failDependencies(options)

The functions produce identical messages notifying you of dependencies added to package.json, but the former produces only warning messages, while the latter causes Danger to fail when added dependencies are found.

The options are passed in the form

{
    dependencies: boolean,
    devDependencies: boolean
}

If a key is omitted, it defaults to false. Passing no options will result in notification of all new dependencies.

Credits

This project was created by Levi Bostian and Oliver Emery.

Dependency size badges in ouput messages are provided by Package Phobia.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.