JSPM

json-minify-cli

0.0.7
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • Downloads 27
    • Score
      100M100P100Q56788F
    • License MIT

    A simple CLI to minify or prettify JSON files

    Package Exports

      This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (json-minify-cli) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

      Readme

      # json-minify-cli

      npm version downloads License: MIT CI/CD Code Style npm install

      A lightweight CLI tool to **minify** and **prettify** JSON files with optional key sorting.


      ## ✨ Features

      - Minify JSON for compact storage or transmission.

      - Prettify JSON with --pretty for easy reading.

      - Sort keys alphabetically with --sort-keys.

      - Works on **Node.js** across Windows, macOS, and Linux.


      ## 📦 Installation

      npm install -g json-minify-cli
      
      
      
      
      
      ---
      
      
      
      \## 🚀 Usage
      
      ```bash
      
      json-minify-cli <input.json> \[options]
      
      
      json-minify-cli input.json --pretty
      
      
      ---
      
      
      
      \## Options
      
      Flag	         Description
      
      --pretty	Output formatted JSON with 2-space indent
      
      --sort-keys	Sort JSON keys alphabetically
      
      
      
      
      
      ---
      
      
      
      \## Examples
      # Minify JSON
      
      json-minify-cli data.json > data.min.json
      
      
      
      \# Prettify JSON
      
      json-minify-cli data.json --pretty
      
      
      
      \# Prettify and sort keys
      
      json-minify-cli data.json --pretty --sort-keys
      
      
      
      ---