Tips and Tricks in a world of Mix

 

Download JSMIN from http://www.crockford.com/javascript/jsmin.html

Instead of opening the WebSite  project , open a WebApp .

(you can see diff here and here – actually it’s an issue by itself )

So , on the Property Pages of your WebApp –> goto  build events –>

build one time script for rebuilding the minified files on each build/rebuild of the project like so :

"$(ProjectDir)..\jsmin\jsmin" < "$(ProjectDir)\scripts\models\employee.js” > "$(ProjectDir)\scripts\models\employee.min.js"

(you must adjust the script line accordingly to the position of the JSMIN in your project)

this will create a few lines of code ..

then you add instead of the regular employee.js  the newly created employee.min.js to your index.html (start page with references to JavaScript files )

Also , be careful to add newly created files to the project – Include in project . Check that it also entered into the Source Safe you are using.

Check in to all and let your team use the minified files on rebuilding the project.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Tag Cloud

%d bloggers like this: