Questions tagged [uglifyjs]

Uglifyjs is a general-purpose JavaScript parser/compressor/beautifier toolkit. It is developed on NodeJS, but it should work on any JavaScript platform supporting the CommonJS module system.

Useful links

847 questions
0
votes
1 answer

Out Of Memory Errors with Sbt-Uglify (Play 2.3.7)

I am having issues with the sbt-uglify plugin in my Play application. I have followed the documentation exactly from https://github.com/sbt/sbt-uglify. In my plugins.sbt I add the plugin: addSbtPlugin("com.typesafe.sbt" % "sbt-uglify" %…
0
votes
1 answer

obfuscate string literals & object keys in javascript?

I'm looking for a Javascript obfuscation tool that will be able to obfuscate specific string literals. I have a class function like this: function Mapper() { var map = {}; this.put = function(name, val) { map[name] = val; }; …
Malki
  • 2,335
  • 8
  • 31
  • 61
0
votes
0 answers

es5 parameters shadowing troubles in safari

In my Grunt/yeoman/angular project, I have part of the code written as node modules and imported by Grunt during the build project with browserify. it happens that, only on safari(checked on 7 and 8), the minified version of the webapp doesn't work…
steeeveb
  • 35
  • 5
0
votes
1 answer

Multiple destination directories using Uglify

If I have the following file/directory structure: somemodule/ └── amd └── src └── foo.js someothermodule/ └── amd └── src └── bar.js Am I able to make grunt-contrib-uglify produce the following minified output? somemodule/ └── amd └──…
Dave Cooper
  • 10,494
  • 4
  • 30
  • 50
0
votes
0 answers

Uglify - javascript error coming using the uglified clubbed file

I am using grunt to club various javascript files and minify them all. e.g module.exports = function (grunt) { grunt.initConfig({ uglify: { build: { src:…
Charanjeet Kaur
  • 1,199
  • 3
  • 14
  • 27
0
votes
1 answer

problems with gulp traceur sourcemaps and uglify

I have the following gulpfile: var gulp = require('gulp'); var sourcemaps = require('gulp-sourcemaps'); var traceur = require('gulp-traceur'); var concat = require('gulp-concat'); var uglify = require('gulp-uglifyjs'); gulp.task('default', function…
David Michael Gang
  • 7,107
  • 8
  • 53
  • 98
0
votes
1 answer

Configure grunt.js to minify files one by one in bower folder

I have the dependencies of the application in bower_components, some of the dependencies don't have a minified version so I'd like to create a task creates a minified copy of the file version in the same place where the file is located…
pedrommuller
  • 15,741
  • 10
  • 76
  • 126
0
votes
1 answer

Building angular application with yoeman

My angular application ran successfully when i used command "grunt serve". But when i built the application by using command "grunt build" The functionality is preserved but the AngularJS breaks. After a lot of searching and trying different…
Div Sehgal
  • 73
  • 1
  • 1
  • 12
0
votes
1 answer

gulp tasks .pipe() working

Im learning gulp and i encountered a problem while executing gulp tasks . here is my working code. in the gulpfile default task is present where console is working but uglify() not creating the file in dist folder. here is my output $…
Pavan Kumar
  • 33
  • 1
  • 6
0
votes
1 answer

Getting yeoman/usermin to uglify .kml file references

I am attempting to use yeoman to scafold a web site, my website includes references to files such as images/foo.kml Running Grunt results in these files being filerev, i.e. the file images/foo.kml is copied to the dist directory but now called…
Dave
  • 577
  • 6
  • 25
0
votes
2 answers

how to have part of some JS code NOT being minified by minifiers

There are many tools out there to "compress" more or less javascript files by mangling variable names, removing comments, etc... But how to "tell" them to NOT process a part of a file, from this file. I need to "tell" them somehow, by even…
Huafu
  • 2,445
  • 1
  • 22
  • 26
0
votes
2 answers

Send uglify parameter for certain flow in gulp

Problem: Having multiple tasks for uglifying different javascript bundles and wanting to uglify this only on production with his own deploy task. Solutions: Too much verbosity to define every task by itself. Using yargs for getting the parameters…
Pepijn
  • 1,204
  • 1
  • 11
  • 25
0
votes
1 answer

uglify with grunt-concurrent not working

I'm trying to use grunt-concurrent to minify my javascript files in parallel. I also use usemin and ngmin. When I use uglify without grunt-concurrent I get the expected result with this log output: Running "uglify:dist" (uglify) task Running…
user1563700
0
votes
1 answer

Grunt Uglify breaks ajax call

I have a function: function createAddressList(url) { $.ajax({ url: url, cache: false, async: true }).done(function (msg) { alert("Data Saved: " + msg); }); } which…
Nealv
  • 6,856
  • 8
  • 58
  • 89
0
votes
1 answer

How works "except" attribute in Grunt Uglify?

I am trying to minify all my javascript files with Uglify, less jQuery and Modernizr files. I am using the attribute "except" inside the mangle options, writting jQuery and Modernizr, but it isn't work and everything is minifyed. Here the Uglify…
Ivanhercaz
  • 731
  • 1
  • 11
  • 31