copy-cli

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

Usage no npm install needed!

<script type="module">
  import copyCli from 'https://cdn.skypack.dev/copy-cli';
</script>

README

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 or CSS minification.

Installation

$ sudo npm install -g copy-cli

Usage

Basic usage:

$ copy file.jpg > /path/to/new.jpg

Remote files:

$ copy https://mydomain.com/myfile.txt > myfile.txt

Standard input:

$ 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)