From 272208e0bc7b7d9f469659cbd112be19bebcc60a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Cl=C3=ADcio?= Date: Wed, 12 Jul 2023 21:12:13 -0300 Subject: [PATCH] build: fix missing Sharp in generated executable --- .gitignore | 1 + README.md | 77 ++++++++++++++++++++++++++++++++++++++++++++++++++++ package.json | 15 ++++++++-- 3 files changed, 90 insertions(+), 3 deletions(-) create mode 100644 README.md diff --git a/.gitignore b/.gitignore index c2658d7..1a87d86 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ node_modules/ +binaries/ diff --git a/README.md b/README.md new file mode 100644 index 0000000..27bec6e --- /dev/null +++ b/README.md @@ -0,0 +1,77 @@ +# All-in-One CLI: One tool all things + +The All-in-One CLI (Command-Line Interface) project aims to provide users with a comprehensive and versatile tool that combines multiple functionalities and services into a single command-line interface. With this powerful utility, users can conveniently access and perform various tasks and operations without the need to switch between different tools or applications. + +## Features + +- [x] Image transformation +- [x] QR Code generation +- [x] Static file server +- [x] Host IP address + +## Installation + +### Method 1: Install from pre-built binaries + +- Verify if binary file is available for your platform in the [Releases](https://github.com/luisclicio/aio-cli/releases) page + +- Download the binary file for your platform and save it with the name `aio` (or `aio.exe` for Windows) + +- Add the binary file to the system path (optional) + +### Method 2: Install from code + +- Install [Node.js](https://nodejs.org/) + +- Clone this repository: + + ```bash + git clone + ``` + +- Go to the project directory: + + ```bash + cd aio-cli + ``` + +- Install dependencies: + + ```bash + npm install + ``` + +- Install the package globally: + + ```bash + npm install -g . + ``` + +## Usage + +Run the `aio` command in the terminal: + +```bash +$ aio + +Usage: aio + $ aio [options] + $ aio help [command] + $ aio image [outputPath] -r auto,400 -g -b 1 -c mask.png,center -t "#000000" -f horizontal + $ aio qr -o qrcode.png -cd "#000000" -cl "#FFFFFF" -s 6 -m 2 "" + $ aio serve -f . -p 3000 + $ aio ip -e + + +All-in-One CLI: one tool all things. + +Options: + -h, --help display help for command + +Commands: + image|img [options] [outputPath] apply image transformations + qr [options] creates QR Code to terminal or image file + serve [options] creates a static file server from a folder + ip [options] shows the IP address of the machine + help [command] display help for command +``` diff --git a/package.json b/package.json index 16e3365..9fd95ac 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "aio", - "version": "0.1.0", + "version": "0.1.1", "description": "All-in-One CLI: one tool all things.", "main": "src/index.js", "bin": { @@ -8,10 +8,19 @@ }, "scripts": { "start": "node src/index.js", - "build": "pkg ." + "build": "pkg --compress GZip ." }, "pkg": { - "outputPath": "release" + "outputPath": "binaries", + "targets": [ + "node18-linux", + "node18-win", + "node18-macos" + ], + "assets": [ + "node_modules/sharp/vendor/**/*", + "node_modules/sharp/build/Release/**/*" + ] }, "keywords": [], "author": "",