npm run *

built-in
92.0% Savings
8 Commands
28.1K Tokens saved
2 Tests

Install

tokf install 21adf539e9b132062b8b6eb3586045fa668f1f22233bfb995c3bf3193178c313
Safety checks passed

Filter definition

command = "npm run *"
description = "Strip npm lifecycle noise; show script output only"
skip = [
  "^> .+@",
  "^\\s*npm warn",
  "^\\s*npm notice",
  "^\\s*npm WARN",
  "^[⸩⸨]",
]

[on_success]
output = "{output}"

[on_failure]
tail = 20

Examples

script failure shows tail ~45 tokens → ~40 tokens (11% saved)
Raw output
> myapp@1.0.0 test
> jest

FAIL src/app.test.js
  ● Test suite failed to run

    Cannot find module './missing' from 'src/app.test.js'

npm ERR! code ELIFECYCLE
npm ERR! errno 1
Filtered output
> jest

FAIL src/app.test.js
  ● Test suite failed to run

    Cannot find module './missing' from 'src/app.test.js'

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm run strips package header and noise ~48 tokens → ~43 tokens (10% saved)
Raw output
> myapp@1.0.0 build
> webpack --mode production

assets by status 142 KiB [emitted]
  asset bundle.js 142 KiB [emitted] [minimized] (name: main)
webpack 5.75.0 compiled successfully in 2340 ms
Filtered output
> webpack --mode production

assets by status 142 KiB [emitted]
  asset bundle.js 142 KiB [emitted] [minimized] (name: main)
webpack 5.75.0 compiled successfully in 2340 ms
Warning: Community filters are third-party code. Review the filter definition above before installing it in production environments.
Browse all filters