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
-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,999
  • 1
  • 15
  • 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,869
  • 5
  • 47
  • 75
-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
2 answers

window.onload does not work when minified using Uglify

When not miniifying the scripts window.onload does work as expected. But when I do minified my scripts using Uglify-js Folder it does not. If I write the following and minify it : window.onload = function() { // My code console.log( "HELLO TO…
Marc DG
  • 51
  • 10
-2
votes
1 answer

How use Angular gulp uglify?

gulp.task("uglify", function () { return ( gulp .src("dist/alparslan-oto/main.js") .pipe(rename("main.js")) .pipe(sourcemaps.init()) .pipe(uglify()) // .pipe(sourcemaps.write()) // Inline source maps. //…
Ali Parlatti
  • 47
  • 1
  • 7
-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
  • 603
  • 1
  • 10
  • 23
1 2 3
56
57