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
- Host: GitHub
- URL: https://github.com/ulisesgascon/useful-npm-scripts
- Owner: UlisesGascon
- License: mit
- Created: 2020-12-15T15:20:30.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2020-12-28T17:41:57.000Z (over 5 years ago)
- Last Synced: 2025-09-14T18:26:22.763Z (9 months ago)
- Language: JavaScript
- Size: 313 KB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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.