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.
Questions tagged [uglifyjs]
819 questions
-1
votes
1 answer
How to minify/uglify document and window properties and methods
I'm looking for a way to minify a code like this:
setTimeout(function() {
document.getElementById('test').innerText = 'Hello World!';
}, 1000);
To something like this (minus spaces and new lines):
(function(a,b){
a(function(){
…
Emanuele Spatola
- 525
- 3
- 10
-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
- 22,494
- 44
- 98
- 127
-1
votes
2 answers
Gulp Concat and Uglify in Folder
I have this Folder Structure in my Project:
|- /src
|-- components
|-- folder1
|-- subfolder1
|-- file1.js
|-- file2.js
|-- file3.js
|-- folder2
|-- subfolder2
|--…
mamsoudi
- 3,638
- 1
- 11
- 22
-1
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,374
- 1
- 13
- 24
-1
votes
1 answer
Parse HTML file to generate list of JS and CSS paths for UglifyJS/UglifyCSS
I am looking for a script that would read through an HTML file (actually a Smarty template file, but that shouldn't matter), parse the paths out of and tags, and use them as input for UglifyJS/UglifyCSS (or other…
Mike Furlender
- 3,488
- 5
- 38
- 70
-1
votes
1 answer
Embedding Uglified Javascript into a Jade template
I have a project that uses grunt to build my site from a Jade template and also builds and concatenates JavaScript using an uglify task (grunt-contrib-uglify).
As I am building a single page app, rather than link to the external uglified version of…
William Owen
- 445
- 1
- 5
- 9
-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.
JS Rocker
- 148
- 1
- 1
- 10
-2
votes
0 answers
Node prod build UglifyJs unexpected token: operator (>)
Hi guys I've got a problem with my webpack config. I have a prod build script to a vue application in which uglifyjs fails on prod build. The dev build however is working.
This is my package.json:
{
"name": "projectname",
"description": "A…
derelektrischemoench
- 69
- 6
-2
votes
1 answer
Is "var undefined;" considered as good?
I think that undefined (or window.undefined) is a constant variable, not a reserved word (like NaN, Infinity, unlike null).
When use UglifyJS to compress a Javascript file which use undefined frequently, it is good if declare a local variable to…
DMaster
- 555
- 7
- 21