2.1.3 • Published 6 years ago

remove-lockfiles v2.1.3

Weekly downloads
78
License
MIT
Repository
github
Last release
6 years ago

remove-lockfiles

Prevent committing lockfiles

Package Version Downloads Status Build Status: Linux Build Status: Windows Coverage Status

Why

Installation

npm install --save-dev remove-lockfiles

Usage

Pre-commit hook

Install husky:

npm install husky --save-dev

Edit package.json to include this configuration:

{
  "scripts": {
    "precommit": "remove-lockfiles"
  }
}

Looking for alternative to husky? We can also use remove-lockfiles with pre-commit.

CLI

Install remove-lockfiles globally:

npm install --global remove-lockfiles

Run the script:

$ remove-lockfiles --help

  Usage
    $ remove-lockfiles [path|options]

  Options
    --shrinkwrap  Remove `npm-shrinkwrap.json` if found

  Examples
    $ remove-lockfiles
    $ remove-lockfiles ../foo
    $ remove-lockfiles --shrinkwrap
    $ remove-lockfiles --shrinkwrap ../foo

API

removeLockfiles(options)

Returns Promise<Array> of deleted lockfiles.

options

Type: Object

cwd

Type: string Default: process.cwd()

Current working directory.

shrinkwrap

Type: boolean Default: false

Set to true to remove npm-shrinkwrap.json.

Related

  • del-nm-cli - Delete node_modules and lockfiles
  • force-del - Force delete files or folders using glob patterns
  • has-lockfile - Detect lockfiles in the working directory

Contributors

Thanks goes to these people (emoji key):

Lufty Wiranda💻 📖 🚇Sindre Sorhus💬 🤔Dan Abramov💬 🤔Ade Viankakrisna Fadlil💬 🤔Jon Crenshaw🤔

This project follows the all-contributors specification. Contributions of any kind welcome!

License

MIT © Lufty Wiranda

2.1.3

6 years ago

2.1.2

6 years ago

2.1.1

6 years ago

2.1.0

6 years ago

2.0.4

6 years ago

2.0.3

6 years ago

2.0.2

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.4.2

6 years ago

1.4.1

7 years ago

1.4.0

7 years ago

1.3.0

7 years ago

1.2.2

7 years ago

1.2.1

7 years ago

1.2.0

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.0

7 years ago

0.2.2

7 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.1.0

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago

0.0.0

7 years ago