srod / Node Minify
Licence: mit
Light Node.js module that compress javascript, css and html files
Stars: ✭ 404
Programming Languages
javascript
184084 projects - #8 most used programming language
Projects that are alternatives of or similar to Node Minify
Html Minifier Terser
actively maintained fork of html-minifier - minify HTML, CSS and JS code using terser - supports ES6 code
Stars: ✭ 106 (-73.76%)
Mutual labels: minify, cli
Octosql
OctoSQL is a query tool that allows you to join, analyse and transform data from multiple databases and file formats using SQL.
Stars: ✭ 2,579 (+538.37%)
Mutual labels: cli, json
Cli
A simple, fast, and fun package for building command line apps in Go
Stars: ✭ 16,995 (+4106.68%)
Mutual labels: cli, json
Contentful Cli
The official Contentful command line interface. Use Contentful features straight from the command line!
Stars: ✭ 200 (-50.5%)
Mutual labels: cli, json
Xidel
Command line tool to download and extract data from HTML/XML pages or JSON-APIs, using CSS, XPath 3.0, XQuery 3.0, JSONiq or pattern matching. It can also create new or transformed XML/HTML/JSON documents.
Stars: ✭ 335 (-17.08%)
Mutual labels: cli, json
Jwt Cli
A super fast CLI tool to decode and encode JWTs built in Rust
Stars: ✭ 336 (-16.83%)
Mutual labels: cli, json
Visidata
A terminal spreadsheet multitool for discovering and arranging data
Stars: ✭ 4,606 (+1040.1%)
Mutual labels: cli, json
Httpie
As easy as /aitch-tee-tee-pie/ 🥧 Modern, user-friendly command-line HTTP client for the API era. JSON support, colors, sessions, downloads, plugins & more. https://twitter.com/httpie
Stars: ✭ 53,052 (+13031.68%)
Mutual labels: cli, json
Rts
RTS: request to struct. Generates Go structs from JSON server responses.
Stars: ✭ 206 (-49.01%)
Mutual labels: cli, json
Autoserver
Create a full-featured REST/GraphQL API from a configuration file
Stars: ✭ 188 (-53.47%)
Mutual labels: cli, json
Jl
jl — JSON Logs, a development tool for working with structured JSON logging.
Stars: ✭ 194 (-51.98%)
Mutual labels: cli, json
Jet
CLI to transform between JSON, EDN and Transit, powered with a minimal query language.
Stars: ✭ 331 (-18.07%)
Mutual labels: cli, json
A very light minifier Node.js module.
Features
It allow you to compress JavaScript, CSS and HTML files.
JavaScript:
CSS:
HTML:
Command Line Interface:
Installation
npm install @node-minify/core # OR yarn add @node-minify/core
And install the compressor you want
npm install @node-minify/uglify-js # OR yarn add @node-minify/uglify-js
Quick Start
const minify = require('@node-minify/core');
const gcc = require('@node-minify/google-closure-compiler');
const uglifyjs = require('@node-minify/uglify-js');
// Using Google Closure Compiler
minify({
compressor: gcc,
input: 'foo.js',
output: 'bar.js',
callback: function(err, min) {}
});
// Using UglifyJS
minify({
compressor: uglifyjs,
input: './**/*.js',
output: 'bar.js',
callback: function(err, min) {}
});
// Using Promise
var promise = minify({
compressor: uglifyjs,
input: './**/*.js',
output: 'bar.js'
});
promise.then(function(min) {});
// Async/Await
async function doMinify() {
const min = await minify({ compressor: uglifyjs, input: 'foo.js', output: 'bar.js' });
}
ES2015+
import minify from '@node-minify/core';
import gcc from '@node-minify/google-closure-compiler';
minify({
compressor: gcc,
input: 'foo.js',
output: 'bar.js',
callback: function(err, min) {}
});
In memory
const htmlMinifier = require('@node-minify/html-minifier');
const html = `
<!doctype html>
<html>
<head>
<meta charset="utf-8">
</head>
</html>`;
minify({
compressor: htmlMinifier,
content: html
}).then(function(min) {
console.log('html min');
console.log(min);
});
Documentation
Visit https://node-minify.2clics.net for full documentation.
License
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].