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

Securing AngularJS Source Code

Since Minify and Uglify can be easily reverse engineered, how then can source code of AngularJS apps really be secured so a developer cannot so easily copy and reuse code I sweat over for months?
user1729972
  • 712
  • 2
  • 9
  • 29
0
votes
1 answer

Task not running in grunt-contrib-uglify

Maybe I'm missing something here but, I'm new on grunt and I don't know why my configuration grunt file is not executing or producing my compress file. Gruntfile 'use strict'; module.exports = function (grunt) { grunt.initConfig({ connect: {…
napstercake
  • 1,815
  • 6
  • 32
  • 57
0
votes
1 answer

Statistics on renaming via JavaScript minifier

I am new to the minification of JavaScript. This is the setting of the problem: Assuming we have an original JavaScript code A and its minified code A′ (which is generated by a minifier like UglifyJS or Closure Compiler), how can I: Count the…
Aliu
  • 99
  • 9
0
votes
1 answer

how to uglify javascript wiithout minifying it?

I'm trying to debug some errors in my JS. I usually use gulp + uglify to get an ugly minified one-liner. Now I need to get the file with the original lines intact to know which line gave me an error - but I'd still like to keep an atmosphere of…
WeaselFox
  • 7,220
  • 8
  • 44
  • 75
0
votes
1 answer

Foundation contact form js not working

I have my contact form ready to go but for some reason when i gulp it with uglify it returns an error and won't minify. My javascript seems correct and it will uglify when I remove the ajax call but with the ajax call it breaks. Any insight? Here's…
pjldesign
  • 387
  • 1
  • 3
  • 17
0
votes
1 answer

Preserve function name uglify mangle

We're linking together Javascript and AS3. For this to work AS3 needs to know the function names of the Javascript methods. We're using Uglify to optimize our Javascript code. Now I don't want these specific functions to be mangled. All other…
Maarten Bicknese
  • 1,498
  • 1
  • 14
  • 27
0
votes
1 answer

What the meaning of browserify . -t [envify --NODE_ENV production] | uglifyjs -cm > js/bundle.min.js

I saw this in flux chat examplethe. browserify . -t [envify --NODE_ENV production] | uglifyjs -cm > js/bundle.min.js Why is browserify . -t [envify --NODE_ENV production] used here? How is the . used? Why is [envify --NODE_ENV production] used…
wwayne
  • 145
  • 1
  • 11
0
votes
1 answer

angular.bootstrap seems to break when uglyfied

I have the following code, on compile I run through ngAnnotate and uglify angular.bootstrap(navWrap, ['my.navbar']); Now I know this is a little unconventional but it works when not minified. However, when I try to minify it causes a provider not…
Jackie
  • 21,969
  • 32
  • 147
  • 289
0
votes
1 answer

Uglify with anonymous function

I have a .js like this and i'm compacting it: 'use strict'; !(function () { var object = typeof exports != 'undefined' ? exports : this; }()); When I use the Google Closure compiler I don't get any erros and the 'this' is referencing the window…
0
votes
1 answer

Gulpjs Uglify JS problems

gulp.task('js', function () { return gulp.src(['public/js/**/*.js','public/js/*.js']) .pipe(ngmin()) .pipe(uglify()) .pipe(concat('app.js')) .pipe(gulp.dest('dist/public/js')); }); I'm having an issue with this task and…
0
votes
1 answer

coordinate symbol mangling

Does anyone know how to get grunt-uglify-contrib to coordinate symbol mangling between output files? We have a rather large project and break up our uglified files into 2 or more files. An example Gruntfile uglify task of ours looks like: uglify: { …
lostdorje
  • 6,150
  • 9
  • 44
  • 86
0
votes
1 answer

Duplicate "function(){}.call(this)" in Uglified JS

My uglified (using rails uglifier) javascript ends like this: /* ... actual code */}.call(this),function(){}.call(this),function(){}.call(this),function(){}.call(this),function(){}.call(this),function(){}.call(this); Or for…
jcuenod
  • 55,835
  • 14
  • 65
  • 102
0
votes
0 answers

Javascript Error in Nginx but not Apache

After switching to Nginx, I've noticed a console error "unexpected end of file" in Chrome. The exact same file is fine though if served via Apache though. I tested by loading it from another domain being served by Apache. The file is "uglified"…
jimbo2087
  • 1,034
  • 8
  • 20
0
votes
1 answer

Grunt Uglify Leading to Error

I started using Grunt to build my app; used the uglify module to minify my scripts . Loading the minified file leads to an error Original :…
Mayur Arora
  • 447
  • 5
  • 11
0
votes
0 answers

Is it okay to replace urls in already minified files?

I'm trying replace some rev'd urls in my distribution bundles. We're using isomorphic React.js and there are a few bundle.js paths that need to be the same on client and server, so I need to update these refs in the rev'd bundle. I'd like to only…
4m1r
  • 12,234
  • 9
  • 46
  • 58