npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

minier

v2.0.1

Published

Automatic Batch Code Compressor

Downloads

34

Readme

minier

License: MIT

Automatic Batch Code Compressor.

❓ What

Automatically and batch compresses code files in a directory while preserving the original file tree.

  • ✨ Zero configuration available.
  • 🎉 Supports .html / .htm / .css / .js / .mjs / .cjs / .json / .xml / .svg files.
  • 📦 Extremely fast compression speed.

🎈 Installation

npm install -D minier@latest

Or use a global installation, which will get the input/output directories for the minier.config.json and relative paths from the directory where the minier command was run.

npm install -g minier@latest

Build commands

minier build

✨ Use ESM

import minier from "minier";

minier({
    baseDir: "src/",
    outDir: "release/"
    /* ... */
});

📝 Configuration

When baseDir and outDir are the same, minier will create a temporary directory as outDir, and the temporary directory will be deleted immediately after the mission is completed, and the files in the baseDir will be overwritten.

Whether in minier.config.json or in the way ESM is used, their configuration items are consistent.

outDir

Specify the output directory. It can also be specified from the -o or --output of the CLI.

String config.outDir || "release/"

{
    "outDir": "example-output-folder/"
}

baseDir

Specify the input directory from which the files that need to be processed before compression will be read. It can also be specified from the -i or --input of the CLI.

String config.baseDir || "src/"

{
    "baseDir": "example-input-folder/"
}

ignore

Based on baseDir ignores directories or files, does not count towards the total number of files, and is copied directly to the output directory.

Array config.ignore || []

{
    "ignore": [
        "node_modules/**",
        "dir/**",
        "sub/dir/**",
        "**/*.mjs"
    ]
}

cleanOutDir

Clear the output folder before exporting.

Boolean config.cleanOutDir || false

{
    "cleanOutDir": true
}

html.minifyCSS

Compress the <style> tag at the same time.

Boolean config.html.minifyCSS || true

{
    "html": {
        "minifyCSS": false
    }
}

html.minifyJS

Compress the <script> tag at the same time.

Boolean config.html.minifyJS || true

{
    "html": {
        "minifyJS": false
    }
}

js.noSpaces

Remove two consecutive spaces in JavaScript.

Boolean config.js.noSpaces || false

Relatively aggressive configuration items.

{
    js: {
        noSpaces: true
    }
}

🎉 Configure inheritance

esbuild

esbuild

This affects .js, .mjs, .cjs, .css files and <script>, <style> tags.

If sourcemap is truthy, it will always be inline.

{
    js: {
        esbuild: {
            loader: "js",
            minify: true
        }
    },
    css: {
        esbuild: {
            loader: "css",
            minify: true
        }
    }
}

htmlTerser

html-minifier-terser

This affects .html and .htm files.

{
    htmlTerser: {
        caseSensitive: true,
        collapseBooleanAttributes: true,
        collapseWhitespace: true,
        conservativeCollapse: false,
        decodeEntities: false,
        html5: true,
        removeComments: true,
        removeEmptyAttributes: true,
        removeScriptTypeAttributes: false,
        removeStyleLinkTypeAttributes: false,
        keepClosingSlash: true,
        ...config.htmlTerser
    }
}

xmlMinify

minify-xml

This affects .svg and .xml files.

{
    xmlMinify: {
        removeComments: true,
        removeWhitespaceBetweenTags: true,
        ...config.xmlMinify
    }
}

📜 License

MIT © ZeoSeven

📑 Changelog

The changelog is included in the package as /changelog.md.