An open API service indexing awesome lists of open source software.

https://github.com/ulisesgascon/useful-npm-scripts

A collection of useful npm scripts
https://github.com/ulisesgascon/useful-npm-scripts

Last synced: 8 months ago
JSON representation

A collection of useful npm scripts

Awesome Lists containing this project

README

          

# useful-npm-scripts

A collection of useful npm scripts

## :gear: Development tasks

- `npm run dev` watch for changes in files and relaunch the service, using [Nodemon](https://www.npmjs.com/package/nodemon).

## :flashlight: Linting tasks

- `npm run lint` review the files
- `npm run lint:fix` review all the files and autofix them.

## 🧪 Testing tasks

- `npm run test` runs all the tests once
- `npm run test:coverage` runs the tests and generates a coverage table and HTML report.
- `npm run test:watch` runs the tests in watch mode.

## :shield: Security tasks

- `npm run security` runs all the `security:*` tasks in parallel
- `npm run security:lockfile` checks the `package-lock.json` and `yarn.lock` integrity in order to prevent poisoned dependencies by using `lockfile-lint`. More info in [snyk blog | Why npm lockfiles can be a security blindspot for injecting malicious modules](https://snyk.io/blog/why-npm-lockfiles-can-be-a-security-blindspot-for-injecting-malicious-modules/)
- `npm run security:gitleaks` scans the git history in order to find leaked credentials (using patterns) by running a docker image `zricethezav/gitleaks`. More info in [Github zricethezav/gitleaks](https://github.com/zricethezav/gitleaks)
- `npm run security:dependencies` runs `npm audit` and `Snyk test` in order to detect dependencies with known vulnerabilities.
- `npm run security:docker` use Snyk to scan your `Dockerfile` and detect known vulnerabilities in the base image used for production mode.