Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Packaging:

Taking file1.js and file2.js and combined them together to make file3.js

Minification:

Using things like JsMin or YUICompressor

Auto-Versioning:

URL has /scripts/file2.js?v=123456

share|improve this question
add comment

1 Answer

I use the JavaScript Compressorator. See my blog post which explains why I like it.

EDIT: I work primarily in SharePoint Designer, so my methods may not match yours. I'm more likely to do this to add my scripts to pages, whether the master page, page layouts, or individual aspx pages.

Yes, I would always use the minified versions in a "production" environment (where I didn't want to do any debugging).

The ?v= thing is sometimes required if you have overzealous caching going on in your environment. If you use unique names for your script files, then it's probably not necessary.

share|improve this answer
    
There are lots of compressors out there. Just wondering what technique you use to include it in SharePoint solutions. Do you manually include the min versions or do you have it going as a build action? –  Shane Aug 23 '11 at 0:57
    
Shane: I added some edits above to explain my approaches more fully. –  Marc D Anderson Aug 24 '11 at 13:18
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.