A general-purpose JavaScript parser/compressor/beautifier toolkit developed on Node.js
Questions tagged [uglifyjs2]
112 questions
0
votes
1 answer
UglifyJS 2: api equivalent for cli -m toplevel?
I'm trying to convert the following command:
uglifyjs src1.js src2.js -c -m toplevel --screw-ie8
to an API call:
ug.minify(['src1.js','src2.js'], {mangle:true, compress:true, ie_proof:false})
But I can't figure out how to set 'toplevel'. Setting…
![](../../users/profiles/2871709.webp)
pixelmike
- 1,751
- 1
- 15
- 29
0
votes
1 answer
Preserve directory structures when optimizing js files with grunt + uglify
I'm using the grunt Uglify plugin to minify the JS files.
The issue I'm having, is that I would like to keep the src directory structure in the dest directory as well.
example:
**src dir:**
js
|- app1
|- randomFile.js
|- scripts
|-…
![](../../users/profiles/1021300.webp)
Maurice
- 1,010
- 10
- 18
0
votes
1 answer
Uglyfying in r.js, but keeping the line breaks, using uglify2
I am looking for a way for making r.js (RequireJS' optimization script) ugylyfying our JS-modules BUT letting the line breaks remain.
Im using uglify2 as my optimize value.
optimize: 'uglify2',
in my build script. I can do…
![](../../users/profiles/592099.webp)
ghostCoder
- 7,009
- 8
- 43
- 63
0
votes
0 answers
UglifyJS2 without Node?
I have a need for compressing JavaScript in a PHP environment. System calls are okay, but I'm working in PHP.
I don't want to have to download and install NodeJS just to get access to Uglify, but Uglify seems to be the only reliable* minifier.
Can…
![](../../users/profiles/507674.webp)
Niet the Dark Absol
- 301,028
- 70
- 427
- 540
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 ';'
…
![](../../users/profiles/2117550.webp)
Kosmetika
- 19,249
- 37
- 94
- 154
0
votes
1 answer
How to minimize jade script tag by using uglifyjs?
I have the following script tag in my jade file:
!!!5
html(lang="en")
head
body
script(type='text/javascript')
function something() {
alert("test")
}
How can I minimized by using uglifyjs or any existing…
![](../../users/profiles/1006884.webp)
Erik
- 11,695
- 42
- 119
- 194
-1
votes
1 answer
Which is the best javascript minifier UglifyJS or YUI compressor?
Please provide me which is fast and best compressor for Javascript. I have shortlisted these two for my application. Please tell me if you know another best compressor.
Thanks in advance.
![](../../users/profiles/1482085.webp)
JS Rocker
- 148
- 1
- 1
- 10