Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

add-dist-header

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

add-dist-header - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

6

bin/cli.js

@@ -34,3 +34,3 @@ #!/usr/bin/env node

// Parameters and flags
const validFlags = ['delimiter', 'keep-first', 'keep', 'no-version', 'note', 'quiet', 'recursive'];
const validFlags = ['delimiter', 'ext', 'keep-first', 'keep', 'no-version', 'note', 'quiet', 'recursive'];
const cli = cliArgvUtil.parse(validFlags);

@@ -62,3 +62,5 @@ const source = cli.params[0] ?? 'build/*';

const pattern = isFolder ? origin + wildcard : origin;
const filenames = globSync(pattern, { nodir: true }).sort();
const extensions = cli.flagMap.ext?.split(',') ?? null;
const keep = (filename) => !extensions || extensions.includes(path.extname(filename));
const filenames = globSync(pattern, { nodir: true }).filter(keep).sort();
const error =

@@ -65,0 +67,0 @@ cli.invalidFlag ? cli.invalidFlagMsg :

@@ -1,2 +0,2 @@

//! add-dist-header v1.2.0 ~~ https://github.com/center-key/add-dist-header ~~ MIT License
//! add-dist-header v1.2.1 ~~ https://github.com/center-key/add-dist-header ~~ MIT License

@@ -3,0 +3,0 @@ export type Settings = {

@@ -1,2 +0,2 @@

//! add-dist-header v1.2.0 ~~ https://github.com/center-key/add-dist-header ~~ MIT License
//! add-dist-header v1.2.1 ~~ https://github.com/center-key/add-dist-header ~~ MIT License

@@ -3,0 +3,0 @@ import { isBinary } from 'istextorbinary';

{
"name": "add-dist-header",
"version": "1.2.0",
"version": "1.2.1",
"description": "Prepend a one-line banner comment (with license notice) to distribution files",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -77,2 +77,3 @@ # Add Dist Header

| `--delimiter` | Characters separating the parts of the header<br>comment. | **string** | `~~` |
| `--ext` | Filter files by file extension, such as `.js`.<br>Use a comma to specify multiple extensions. | **string** | N/A |
| `--keep-first` | Do not delete the original first line comment. | N/A | N/A |

@@ -98,4 +99,4 @@ | `--no-version` | Do not substitute occurrences of `{{pkg.version}}`<br>with the **package.json** version number. | N/A | N/A |

- `add-dist-header build dist --recursive`<br>
Include the subfolders of **build**.
- `add-dist-header build dist --ext=.js,.css --recursive`<br>
Process only JavaScript and CSS files in the **build** folder and its subfolders.

@@ -102,0 +103,0 @@ ## C) Application Code

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc