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

I am building out a Single Page Application using knockout.js on a sub-site which I do have control of the parent site collection. I know most people recommend storing JS and CSS files in the Style Library but logically I find it odd if I were to store JS, CSS and HTML which are specific to a single page on a sub-site in the site collection Style Library.

So right now I have CSS, JS, IMAGE and HTML folders in the Site Assets library of the sub-site.

Thoughts?

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

There are "best practice" of doing it, but it really comes down to scope. If the files work where you have them and they can be correctly deployed there, I would say let them stay there.

It is really all about getting files into the right scope onto the server.

Now if this application is shared on multiple sub-sites, definitely move the files to a shared location.

share|improve this answer
    
Thanks. I am going a 'split' route basically. All of the libraries I am using (knockout, jQuery etc.) are getting dropped into the Style Library. But the code which is SPECIFIC to that page and that page only (since it is MVVM) I am keeping in the local library. I think it will actually help me manage in the long run. –  Ecanem Mar 22 '13 at 14:46
    
That would be the right way to go. In the answer I referring more to the css and js files. –  thantos Mar 22 '13 at 14:53
1  
This should be marked as the answer if it solved your issue –  Ryan Erickson Mar 23 '13 at 4:49
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.