Questions tagged [jsmin]

a JavaScript minification filter written by Douglas Crockford

JSMin is a JavaScript minification filter written by Douglas Crockford. It removes comments and whitespace from JavaScript to reduce file size.

Evildoers should be aware that, according to JSMin's modified MIT License:

The Software shall be used for Good, not Evil.

References

Related Tags

16 questions
3
votes
1 answer

Using Jsmin build event in Visual Studio to combine files

Im having trouble using JSmin to combine and minify my files on successful build: I think my syntax is correct but the output is empty if $(ConfigurationName) == Debug goto :exit if $(ConfigurationName) == Alpha goto :combineLibsPluginsJs goto…
Mike Fielden
  • 10,055
  • 14
  • 59
  • 99
3
votes
0 answers

JavaScript compression error while compressing JSDOM with JSMin

My project is developed with TypeScript for frontend. Mocha - for unit test JSDOM - for DOM mocking Hammer.js - for touch UX Grunt, JSMin, etc. The project file structure is something like this: index.ts mymodule.ts mymodule_test.ts As Hammer.js…
DumTux
  • 668
  • 1
  • 9
  • 24
3
votes
2 answers

CFExecute of jsmin fails

I am trying to minify some files in a roll-up script using jsmin. This works just fine on my local machine but when pushed to production it doesn't work at all. I am running the built-in CF development server locally and IIS on production. Not…
illvm
  • 1,336
  • 13
  • 28
2
votes
1 answer

Using executable file from SVN on a post-build event

I am trying to use JSMin to compress Javascript on a .NET project, but since I don't want to create another dependency on the project I was wondering how could I have the executable file on my source control so that when building the project, so…
jAlpedrinha
  • 179
  • 1
  • 7
2
votes
0 answers

If I'm using cache why it's necessary to use CSS sprites and bundle static resources

I'm making big effort in order to get better performance for web application that I developing. My question is: If I'm already using cache for images, JS's, CSS's and other static resources why it's necessary to use CSS sprites, JS/CSS bundle,…
Shlomi Elbaz
  • 59
  • 1
  • 5
2
votes
1 answer

Javascript Unbounded Regex Literal - need help understanding this

I'm attempting to utilize wro4j (1.6.2 and 1.6.3-SNAPSHOT) under maven and I've run into a problem with the jquery.tablesorter.js plugin. On line 972 (or there about) there is a regex that eclipse and the wro4j JSMin (java port) are not…
Dave G
  • 9,639
  • 36
  • 41
2
votes
1 answer

django-compressor creates javascript with syntax errors

A bit of background... I'm setting up my new site's base template and I'm including some popular javascript libraries, such as AngularJS, Bootstrap's javascript files, and Underscore.js. Of course I wrap these files in {% compress js %}. Example…
stryderjzw
  • 582
  • 1
  • 6
  • 9
2
votes
1 answer

why would jsmin quit early when run in a python subprocess?

I have downloaded and compiled jsmin.c, and run it on a javascript file from the terminal, and it seems to work great. But when I call it from an os.system() or os.popen() call in a python script (on the same input file), the output file (the…
Shavais
  • 2,476
  • 1
  • 27
  • 25
1
vote
1 answer

array of filenames blacklist in ruby

I have a rakefile which uses jsmin to minify the files. one thing that I need to do is that is to have a array of files which will serve as a blacklist which jsmin wouldn't include in when running the minify script. jsFolder = "./scripts" …
franticfrantic
  • 2,511
  • 3
  • 17
  • 14
1
vote
1 answer

JSMin Errors Out

When running a gulp task below I get the following error message from JSmin: /var/www/html/a/node_modules/gulp-jsmin/node_modules/jsmin-sourcemap/node_modules/jsmin2/lib/jsmin.c.index.js:40 stream.write(str); ^ TypeError:…
jabbott7_depaul
  • 51
  • 1
  • 1
  • 4
1
vote
0 answers

Too much JS to minify with JSMinPlus

I'm running in an issue since a few weeks that I couldn't resolve so far. The problem is that my generated js that is used as cache by my application contains inline // that basically fail when interprated by the browser. Now, I'm looking for the…
Vadorequest
  • 16,593
  • 24
  • 118
  • 215
0
votes
1 answer

trimming white space at end of lines javascript

I am running a js file through a minifier which is leaving line breaks at unexplained positions. For example currently I have the following code: var example = "var name = 'john'; function sayName () { alert('hi'); …
user6002037
0
votes
1 answer

Minifying JavaScript Effectively With Php

Hi everyone i have a Php function which use JSMin to Minify JavaScript but i want a regex to replace long arguments name with a or b function foo(long_arg_name, long_arg_name2){ alert(long_arg_name + long_arg_name); } to function…
0
votes
1 answer

Using Django Pipeline, why am I running into JS errors?

I've configured Django Pipeline (verison 1.3.15) for a single group of JS files. I've configured them in the same order that they appear in my page normally. Everything works fine with collectstatic, etc. When I view the source, everything appears…
orokusaki
  • 55,146
  • 59
  • 179
  • 257
0
votes
0 answers

combining multiple js files into 1 single file

I am trying to combine all my js files into 1 js file. Everything is working perfectly until I'm trying to copy and paste the content of the jQuery 2.0.2 file. I can make it work via JSMin but I prefer not to use this method so I was wondering if…
user2510306
  • 47
  • 2
  • 7
1
2