🌐
npm
npmjs.com › package › uglify-js
uglify-js - npm
August 29, 2024 - It should be initially empty. Example: $ rm -f /tmp/cache.json # start fresh $ uglifyjs file1.js file2.js --mangle-props --name-cache /tmp/cache.json -o part1.js $ uglifyjs file3.js file4.js --mangle-props --name-cache /tmp/cache.json -o part2.js
      » npm install uglify-js
    
Published   Aug 29, 2024
Version   3.19.3
Author   Mihai Bazon
🌐
Skalman
skalman.github.io › UglifyJS-online
UglifyJS 3: Online JavaScript minifier
This is a simple wrapper for the browser around the minifier; the hard work is done by the Uglify team. If you need an automated solution, I suggest checking out the source code, intended for Node.JS.
🌐
Snyk
snyk.io › advisor › uglify-js › uglify-js code examples
Top 5 uglify-js Code Examples | Snyk
December 25, 2022 - var compressor = UglifyJS.Compressor({}); var compressed_ast = toplevel.transform(compressor); compressed_ast.figure_out_scope(); compressed_ast.compute_char_frequency(); compressed_ast.mangle_names(); var stream = UglifyJS.OutputStream({}); compressed_ast.print(stream); var code = ...
🌐
Lisperator
lisperator.net › uglifyjs
UglifyJS — JavaScript parser, compressor, minifier written in JS
If you installed it with npm install or npm link as mentioned above, then this file is loaded when you say var UglifyJS = require("uglify-js2").
🌐
KeyCDN
keycdn.com › support › uglifyjs
Minify JavaScript Files with UglifyJS - KeyCDN Support
To help demonstrate the effectiveness of using a minifier on a JavaScript file, we'll go over a couple of examples using the CLI. With UglifyJS installed and a JavaScript file ready, let's see how much we save in terms of file size. For this example, we'll use a copy of Jquery-3.2.1.js.
🌐
Tabnine
tabnine.com › home page › code › javascript › uglify-js
uglify-js JavaScript and Node.js code examples | Tabnine
// minify code function minify(code) { var result = UglifyJS.minify(code, { mangle: false }); if (result.error) throw result.error; return result.code; } ... browserify(__dirname + '/toml.js', { standalone: 'toml' }).bundle(function (err, buf) ...
🌐
GitHub
github.com › mishoo › UglifyJS
GitHub - mishoo/UglifyJS: JavaScript parser / mangler / compressor / beautifier toolkit · GitHub
It should be initially empty. Example: $ rm -f /tmp/cache.json # start fresh $ uglifyjs file1.js file2.js --mangle-props --name-cache /tmp/cache.json -o part1.js $ uglifyjs file3.js file4.js --mangle-props --name-cache /tmp/cache.json -o part2.js
Starred by 13.4K users
Forked by 1.2K users
Languages   JavaScript
🌐
JS Minify
uglifyjs.net
JS Minify and Beautify - Online
Begin with the "type (or paste) here..." area to enter your data, then hit the "minify" or "beautify" buttons respectively. After a blink of any eye, the results will be shown below these buttons.
🌐
Kevin Chisholm
blog.kevinchisholm.com › javascript › node-js › getting-started-with-the-uglify-js-node-js-module
Getting started with the uglify-js Node.js module | Kevin Chisholm - Blog
February 10, 2021 - We just want to have a reference so that once we have uglified the files, we can see the difference in the output. ... In Example # 2A, we minify the file: file-1.js. In this case, the minified code is simply shown in the console.
Find elsewhere
🌐
CloudDefense.ai
clouddefense.ai › code › javascript › example › uglify-js
Top 10 Examples of uglify-js code in Javascript
fs.readFile(jsPath, 'utf8', function (err, str) { if (err) { console.log(err); return error(err, next); } try { var ast = parser.parse(str); ast = uglifyer.ast_mangle(ast); ast = uglifyer.ast_squeeze(ast); fs.writeFile(minjPath, uglifyer.gen_code(ast), 'utf8', function (err) { next(err); }); } catch (ex) { // Probably reached this because of invalid // syntax in js file.
🌐
CodeSandbox
codesandbox.io › examples › package › uglify-js
uglify-js examples - CodeSandbox
Use this online uglify-js playground to view and fork uglify-js example apps and templates on CodeSandbox.
🌐
GitHub
github.com › gruntjs › grunt-contrib-uglify
GitHub - gruntjs/grunt-contrib-uglify: Minify files with UglifyJS.
Report minification result or both minification and gzip results. This is useful to see exactly how well uglify-js is performing but using 'gzip' will make the task take 5-10x longer to complete. Example output.
Starred by 1.5K users
Forked by 347 users
Languages   JavaScript 100.0% | JavaScript 100.0%
🌐
YouTube
youtube.com › kevin chisholm
Introduction to the uglify-js Node.js module - YouTube
https://blog.kevinchisholm.com/javascript/node-js/getting-started-with-the-uglify-js-node-js-module/ In this video, I’ll provide a brief introduction to the ...
Published   February 13, 2017
Views   7K
🌐
GitHub
github.com › gruntjs › grunt-contrib-uglify › blob › main › docs › uglify-examples.md
grunt-contrib-uglify/docs/uglify-examples.md at main · gruntjs/grunt-contrib-uglify
Note: this generated file uses the same JSON format as the exceptionsFiles files. // Project configuration. grunt.initConfig({ uglify: { options: { nameCache: '.tmp/grunt-uglify-cache.json', }, my_target: { files: { 'dest/output1.min.js': ['src/input1.js'], 'dest/output2.min.js': ['src/input2.js'] } } } });
Author   gruntjs
🌐
Tabnine
tabnine.com › home page › code › javascript › gulp-uglify
gulp-uglify.uglify JavaScript and Node.js code examples | Tabnine
/** * 生产模式合并 admin js */ gulp.task('concat-admin-js-less', ['clean'], function () { return gulp.src(['./src/admin/main.js', './src/admin/controllers/*.js', './src/admin/services/*.js', './src/admin/directives/*.js', './src/admin/filters/*.js']) .pipe(concat('main.js')) .pipe(uglify()) .pipe(gulp.dest('./public/assets/admin/')); });
🌐
GitHub
github.com › terinjokes › gulp-uglify
GitHub - terinjokes/gulp-uglify: Minify files with UglifyJS
var uglifyjs = require('uglify-js'); // can be a git checkout // or another module (such as `uglify-es` for ES6 support) var composer = require('gulp-uglify/composer'); var pump = require('pump'); var minify = composer(uglifyjs, console); ...
Starred by 1.2K users
Forked by 153 users
Languages   JavaScript 100.0% | JavaScript 100.0%
🌐
Tabnine
tabnine.com › home page › code › javascript › gulp-uglify
gulp-uglify JavaScript and Node.js code examples | Tabnine
/** * 生产模式合并 admin js */ gulp.task('concat-admin-js-less', ['clean'], function () { return gulp.src(['./src/admin/main.js', './src/admin/controllers/*.js', './src/admin/services/*.js', './src/admin/directives/*.js', './src/admin/filters/*.js']) .pipe(concat('main.js')) .pipe(uglify()) .pipe(gulp.dest('./public/assets/admin/')); });
🌐
Rip Tutorial
riptutorial.com › concat and uglify js and css files
gulp Tutorial => Concat and Uglify JS and CSS files
var gulp = require('gulp'); var gulp_concat = require('gulp-concat'); var gulp_rename = require('gulp-rename'); var gulp_uglify = require('gulp-uglify'); var uglifycss = require('gulp-uglifycss'); var destDir = './public/assets/dist/'; //or any folder inside your public asset folder var tempDir = './public/assets/temp/'; //any place where you want to store the concatenated, but unuglified/beautified files //To concat and Uglify All JS files in a particular folder gulp.task('js-uglify', function(){ return gulp.src(['./public/js/**/*.js','./public/assets/js/*.js']) //Use wildcards to select all