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 0.1.2 to 0.1.3

2

bin/cli.js

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

const flagMap = Object.fromEntries(flags.map(flag => flag.replace(/^[-]*/, '').split('=')));
const delimiter = flagMap.delimiter ?? '~';
const delimiter = flagMap.delimiter ?? '~~';
const replace = flagMap.replace !== 'false';

@@ -41,0 +41,0 @@ const version = flagMap.version !== 'false';

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

//! add-dist-header v0.1.2 ~ https://github.com/center-key/add-dist-header ~ MIT License
//! add-dist-header v0.1.3 ~~ https://github.com/center-key/add-dist-header ~~ MIT License

@@ -3,0 +3,0 @@ export declare type Options = {

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

//! add-dist-header v0.1.2 ~ https://github.com/center-key/add-dist-header ~ MIT License
//! add-dist-header v0.1.3 ~~ https://github.com/center-key/add-dist-header ~~ MIT License

@@ -10,3 +10,3 @@ import { format, parse } from 'path';

dist: 'dist',
delimiter: '~',
delimiter: '~~',
replaceComment: true,

@@ -13,0 +13,0 @@ setVersion: true,

{
"name": "add-dist-header",
"version": "0.1.2",
"version": "0.1.3",
"description": "Adds a header comment to a file and saves it to your distribution folder (written in TypeScript)",

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

@@ -16,3 +16,3 @@ # Add Dist Header

```javascript
//! my-app v0.3.7 ~ https://github.com/my-organization/my-app ~ MIT License
//! my-app v0.3.7 ~~ https://github.com/my-organization/my-app ~~ MIT License
```

@@ -64,3 +64,3 @@

[17:13:51] add-dist-header dist/my-app.js 1,569.70 kB
$ npx add-dist-header "meta/config.js" #creates "dist/config.js" prepended with a comment header
$ npx add-dist-header "meta/config.js" #creates "dist/config.js" prepended with header
[17:15:03] add-dist-header dist/config.js 3.91 kB

@@ -82,7 +82,7 @@ ```

## 4) CLI Flags
| Flag | Description | Values | Default |
| ----------- | ----------------------------------------------------------------------------------- | --------------- | ------- |
| `delimiter` | Character separating the parts of the header comment. | **string** | `~` |
| `replace` | Delete the original first line comment (if not marked `!` important). | `true`, `false` | `true` |
| `version` | Substitute occurrences of `~~~version~~~` with the **package.json** version number. | `true`, `false` | `true` |
| Flag | Description | Values | Default |
| ------------- | ----------------------------------------------------------------------------------- | --------------- | ------- |
| `--delimiter` | Characters separating the parts of the header comment. | **string** | `~~` |
| `--replace` | Delete the original first line comment (if not marked `!` important). | `true`, `false` | `true` |
| `--version` | Substitute occurrences of `~~~version~~~` with the **package.json** version number. | `true`, `false` | `true` |

@@ -89,0 +89,0 @@ <br>

Sorry, the diff of this file is not supported yet

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