Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/loilo/node-bash-minifier
Minify bash scripts
https://github.com/loilo/node-bash-minifier
Last synced: 5 days ago
JSON representation
Minify bash scripts
- Host: GitHub
- URL: https://github.com/loilo/node-bash-minifier
- Owner: loilo
- License: mit
- Created: 2017-06-14T11:26:58.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-06-08T23:28:41.000Z (over 6 years ago)
- Last Synced: 2024-11-05T03:06:30.881Z (8 days ago)
- Language: JavaScript
- Size: 14.6 KB
- Stars: 6
- Watchers: 3
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Bash minifier
This Node.js package minifies bash scripts. It's a JavaScript port of the Python bash minifier over at [precious/bash_minifier](https://github.com/precious/bash_minifier).
## Installation
Install via npm:```bash
npm install --save bash-minifier
```## Usage
Using the minifier is dead simple:```javascript
const minify = require('bash-minifier')minify(`
if [ $# -ne 1 ]; then
printf "Filename is required.\n"
:
fi
`)
```This will return the following minified bash script:
```bash
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](http://bash-minifier.appspot.com/). If they produce the same error, please open an issue there.