bash-minifier

0.1.3 • Public • Published

Bash minifier

This Node.js package minifies bash scripts. It's a JavaScript port of the Python bash minifier over at precious/bash_minifier.

Installation

Install via npm:

npm install --save bash-minifier

Usage

Using the minifier is dead simple:

const minify = require('bash-minifier')
 
minify(`
  if [ $# -ne 1 ]; then
    printf "Filename is required.\n"
    :
  fi
`)

This will return the following minified bash script:

if [ $# -ne 1 ];then printf "Filename is required.\n";:;fi

Contributing

Before you report any bugs, please check first if you can reproduce them with the original minifier. If they produce the same error, please open an issue there.

/bash-minifier/

    Package Sidebar

    Install

    npm i bash-minifier

    Weekly Downloads

    11

    Version

    0.1.3

    License

    MIT

    Unpacked Size

    15.4 kB

    Total Files

    4

    Last publish

    Collaborators

    • loilo