UNPKG

copy-cli

Version:

A CLI tool for copying files, with optional CSS/JS minification.

36 lines (28 loc) 861 B
# copy A CLI tool for copying files, either from a local path, a remote HTTP(s) address, or stdin. Optionally, the output file can be minified using [JS](https://github.com/mishoo/UglifyJS2) or [CSS](https://github.com/jakubpawlowicz/clean-css) minification. ## Installation ```bash $ sudo npm install -g copy-cli ``` ## Usage Basic usage: ```bash $ copy file.jpg > /path/to/new.jpg ``` Remote files: ```bash $ copy https://mydomain.com/myfile.txt > myfile.txt ``` Standard input: ```bash $ echo "alert('hello world')" | copy --minify=js > hello.min.js ``` ## Options ``` --help, -? Displays help information --minify, -m Assign this option "js" or "css" to minify the output ``` ## Useful Information The CSS minifiction does **NOT** follow @import directives. ## License MIT License (https://github.com/JoshuaWise/copy/blob/master/LICENSE)