Hosting your JS files on Google Code

Google Codee ImageGoogle Code is one of those services from Google whose list of benefits is near endless. Its a service which provides free hosting of your Project files including JavaScript files with Unlimited Bandwidth. Even though it is possible to include JavaScript Files into Blogger itself (See how) but sometimes while editing ,due to Blogger's habit to Escape Code automatically it can become a bit frustrating.






Lets Get Started:

1. Go to code.google.com/hosting/ and click on create a new project.







2. Now fill the Details as per your needs, and make sure you set the Version control system as Subversion & the Source code license as Mozilla Public License 1.1 (select something else as per requirement, but this is suited for general use)







3. After creating the project you will be redirected to the Home Screen of your Project which is explained in more detail in the Image below





The rest of the menu items will be needed if you will be hosting a project ,which would require descriptions (Wiki), problem reporting (Issue),etc

4. Now go to Source > Browse > svn > trunk > Create or Upload file.





5. Now you either upload or create a js file you want to be hosted ,with brief description of what its about and Then Click the Commit button





6. After doing this you will be redirected to a Page with the whole code , there in the left side you will see View raw file , click it and copy the URL in the Address bar (This is the Absolute URL of your JS file).




Now you can easyily embed this in your page using the script tag ,for example:



<script src='http://projectname.googlecode.com/svn/trunk/Zen.js' type='text/javascript'/>

A bit of Advice: Even though you can host about 4GB of code, I suggest refraining from Mass Uploading stuff (This even implies to the Download Section). I have first hand experience in this - Got my Project removed ,as I had uploaded a lot of stuff to it ,including the Download packages of lot of my tutorials.

Thanks to Navneet Pandey for pointing out a very grave error in the Post, Changing the Version from Mercurial to Subversion


Have some problems or experiences to share related to Google Code, feel free to share

0 comments:

Post a Comment

 
© 2009 Blogger Tips 2013 | Powered by Blogger