New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@node-minify/run

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@node-minify/run

exec commands for @node-minify

latest
Source
npmnpm
Version
10.5.0
Version published
Maintainers
1
Created
Source

node-minify

A very light minifier Node.js module.


npm version npm downloads Build Status code coverage

@node-minify/run

Command execution wrapper for Java-based compressors in node-minify.

This package provides utilities to spawn Java processes for compressors like YUI Compressor and Google Closure Compiler.

Installation

npm install @node-minify/run

Usage

import { runCommandLine } from '@node-minify/run';

const result = await runCommandLine({
  args: ['-jar', 'path/to/compiler.jar'],
  data: 'var foo = 1;'
});

console.log(result); // Minified output

API

runCommandLine(params)

Executes a Java command with the provided arguments and pipes data to stdin.

Parameters

NameTypeDescription
params.argsstring[]Command line arguments for the Java process
params.datastringContent to minify (piped to stdin)

Returns

Promise<string> - The minified content from stdout.

Throws

  • Error if the Java process exits with a non-zero code
  • Error if there's a process spawn error

Requirements

  • Java Runtime Environment (JRE) must be installed and available in PATH

License

MIT

Keywords

compressor

FAQs

Package last updated on 08 Mar 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts