Socket
Socket
Sign inDemoInstall

merge-comments

Package Overview
Dependencies
6
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    merge-comments

Simple tool that merges single-line comments into multi-line ones.


Version published
Maintainers
1
Created

Readme

Source

Merge-comments

What is it?

Merge-comments is a tool that merges single-line comments into multi-line ones.

Example

file.js

// alone comment
var a = 'b';
// first comment
// second comment
// third comment
$ merge-commits ./file.js
Done: file.js:
// alone comment
var a = 'b';
/**
 * first comment
 * second comment
 * third comment
 */

Usage

Install with npm:

    $ [sudo] npm install merge-comments --save

If you want to use merge-comments on your cli install with:

    $ [sudo] npm install merge-comments -g

CLI

Usage:

    $ merge-comments [OPTIONS]

Options:

    -i INPUT, --input=INPUT : Glob string(s) or file path(s) to process, "-" for STDIN
    -o, --output : Output directory path, "-" for STDOUT
    -m, --mask : Mask for output file name, '_?' by defaults

Arguments:

    INPUT : Alias to --input

Example:

  • with files:
    $ merge-comments test.js

or
 
    $ merge-comments test.js -o ./merged/
    
or
    
    $ merge-comments test.js test2.js -o ./merged/
    
or
    
    $ merge-comments *.js -o ./merged/ -m merged_?
  • with STDIN / STDOUT:
    $ cat test.js | merge-comments -i - -o - > test.merged.js

Keywords

FAQs

Last updated on 22 Jun 2016

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc