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

Does express-uglifyjs tolerate missing semicolons ? (strict_semicolons)

I'm using express-uglify 0.3.1, (uses uglify-js 1.3.4) and I'm getting parse errors for every missing semicolon. The doc : https://github.com/mishoo/UglifyJS/ mentions a strict_semicolons option, that apparently defaults to false. How can I…
Max L.
  • 9,774
  • 15
  • 56
  • 86
0
votes
1 answer

Concatenate & minify directory of JS files into one JS file with Guard and UglifyJS

I have a folder of JS plugins that i would like to concatenate and minify into a plugins.js file using Guard and UglifyJS Here's what I have in my Guardfile so far guard 'uglify', :input => 'js-unprocessed/plugins/*.js', :output =>…
Paul Mason
  • 1,818
  • 2
  • 20
  • 32
0
votes
2 answers

Minify / Combining all JS files from directory

I am new to uglify-js. I want to minify all javascript files from src/js/ directory to lib/js/. Is there any command to minify all js files directory? Thanks in advance.
Dipesh Gandhi
  • 765
  • 1
  • 13
  • 31
0
votes
1 answer

Grunt.js - uglify / yui compressor - one to one file mapping

I know I can uglify multiple files into one like this: uglify: { dist: { files: { 'Scripts/build.js': ['Scripts/*.js'] } } } But what if a want to uglify multiple files without bundling and without writing each…
Sergej Popov
  • 2,933
  • 6
  • 36
  • 53
0
votes
1 answer

uglify.js, internet explorer 9 error

please help don't know what's this but seems uglify.js source maps proceed with IE9 error it looks like User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0) Timestamp: Tue, 23 Apr 2013 07:29:26 UTC Message: Expected ';' …
Kosmetika
  • 20,774
  • 37
  • 108
  • 172
0
votes
1 answer

No module error while trying to compress static files

I'm trying to compress my static files using node and keep getting a no module error Basil-MBP:syte Basil$ python compress.py Traceback (most recent call last): File "compress.py", line 13, in from django.conf import…
bsiddiqui
  • 1,886
  • 5
  • 25
  • 35
0
votes
1 answer

Javascript regex to match a pattern but NOT match a regex literal (r.js optimizer and uglify issue)?

I've got a Backbone application, organized into modules using Require.js. One of these modules contains a Handlebars helper, which has a method I use to pull a legal header off of all our HTML templates for each View. The header is contained in an…
J. Ky Marsh
  • 2,465
  • 3
  • 26
  • 32
0
votes
1 answer

UglifyJS / UglifyJS2 - How hard it is to decrypt / revert-engineer the result?

Is there any tool already available that could revert the optimized blob back into human readable, easily-understandable state?
gsklee
  • 4,774
  • 4
  • 39
  • 55
0
votes
2 answers

How can I check for undefined identifiers using UglifyJS

I want to use the UglifyJS parser to check if any identifiers in a piece of code are used when they are not guaranteed to be defined. Example: // Should raise an error since myfunc and myvar have not been defined, but works var ast =…
Flash
  • 15,945
  • 13
  • 70
  • 98
0
votes
1 answer

Encoding options not supported in 1.8: r:UTF-8

I am trying to use Ruby Uglifier gem, but it's giving this warning and the output javascript is not minified: /usr/lib/ruby/gems/1.8/gems/uglifier-1.2.7/lib/uglifier.rb:51: warning: encoding options not supported in 1.8: r:UTF-8
amtanay
  • 23
  • 5
0
votes
1 answer

uglified code will not write into file

i want to traverse the directory and get the .js files and uglifying using uglifyjs and node.js but i have some problems with my code. below is my code : var mkdirp = require( 'mkdirp' ), walk = require( 'walk' ), fs = require( 'fs' ), …
Shreedhar
  • 5,502
  • 3
  • 22
  • 27
0
votes
1 answer

Is there an option flag to ignore any javascript errors in uglifyjs?

I'm using uglifyjs module in node.js. When I use the following command to minify my scripts, I get a javascript parse error from uglifyjs. Is there a way to ignore it? I like to check my js errors in browser, not with uglifyjs. cat file1.js file2.js…
Moon
  • 22,195
  • 68
  • 188
  • 269
-1
votes
1 answer

Executing long taking uglifyjs on VPS

I have a VPS server where I am updating the code and one step is to execute UglifyJS, this is very slow and takes about 20 seconds. Our VPS will always kill the process that takes 100% CPU for longer than 10 seconds. So what I do is start uglify…
exebook
  • 32,014
  • 33
  • 141
  • 226
-1
votes
2 answers

UglifyJs unexpected token error

I have already used this in my webpack.config.js use: [{ loader: 'babel-loader', options: { presets: ['es2015', 'es2016', 'react'] } }] But still I am getting error at the token let which I have used. I get…
ANURAG GUPTA
  • 173
  • 1
  • 13
-1
votes
1 answer

gulp maintain same destination path as in the source

I have a below angular folder structure . I want to uglify/minify the js and html files. Finally I want the same folder structure is maintained in the "build" folder. How can I do this in gulp? client views index.html …
JavaUser
  • 25,542
  • 46
  • 113
  • 139
1 2 3
56
57