
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
add-dist-header
Advanced tools
Adds a header comment to a file and saves it to your distribution folder (written in TypeScript)
<img src=https://centerkey.com/graphics/center-key-logo.svg align=right width=200 alt=logo>
Adds a header comment to a file and saves it to your distribution folder
add-dist-header uses the name
, repository
, and license
from your
project's package.json file to create a header comment.
Example header comment:
//! my-app v0.3.7 ~ github:my-organization/my-app ~ MIT License
Install package for node:
$ npm install --save-dev add-dist-header
Call add-dist-header
from the "scripts"
section of your package.json file.
For example:
"scripts": {
"add-headers": "add-dist-header build dist"
},
Or, run from the terminal in your project home folder, such as:
$ ls package.json
package.json
$ npx add-dist-header "build" "dist"
[add-dist-header] dist/my-app.d.ts ~ length: 413
[add-dist-header] dist/my-app.js ~ length: 1569
The parameters are optional:
$ npx add-dist-header #same as above since "build/*" "dist" are the default parameters
[add-dist-header] dist/my-app.d.ts ~ length: 413
[add-dist-header] dist/my-app.js ~ length: 1569
$ npx add-dist-header "target/my-app-cli.js" #creates "dist/my-app.js" prepended with a comment header
[add-dist-header] dist/my-app-cli.js ~ length: 413
FAQs
Prepend a one-line banner comment (with license notice) to distribution files
The npm package add-dist-header receives a total of 58 weekly downloads. As such, add-dist-header popularity was classified as not popular.
We found that add-dist-header demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.