As a blogger/designer sometime you must need to
host your own JavaScript files on the web. It’s not mandatory that you have to upload it in
Google Code but it’s important. When Google giving us the opportunity to upload javascript in Google Code then why should we use another service?
About this post:
There you will find so many options to upload/host JavaScript in Google Code. But today I’ll give you the best one which is also the
recommended way by Google. So personally I’ll suggest you to go with this method. And for your kind information I should tell you, it’s really so simple and easy.
How to upload javascript to google code:
As I mentioned above this whole process to upload javascript in googlecode is so simple, but after all for newbie’s it could be difficult to understand.
For them (newbie) I have divided the whole process to uploading javascript (.js) in Google Code in three parts.
- Configuring application
- Creating a new project
- Starting upload and getting link
Configuring application:
Step 1: First thing first. Download the software called
TortoiseSVN by clicking
http://tortoisesvn.net/downloads.html Now install it by double click. After completing the installation process you must have to
restart your computer to integrated this software with the context menu / right click menu (shell command).
Step 2: After restating your computer
Right Click on desktop and select
TortoiseSVN » Settings Step 3: A new window will appear like below screenshot. Select
General from left side menu and click on
Edit.
Step 4: Once clicked the Edit button, the TortoiseSVN’s
config file will open. Now search for
# Makefile = svn:eol-style=native and
copy and paste the below piece of code just
under / below it. Save the changes you just did with config file.
[miscellany]
enable-auto-props = yes
[auto-props]
# Scriptish formats
*.bat = svn:eol-style=native; svn:keywords=Id; svn-mine-type=text/plain
*.bsh = svn:eol-style=native; svn:keywords=Id; svn:mime-type=text/x-beanshell
*.cgi = svn:eol-style=native; svn:keywords=Id; svn-mine-type=text/plain
*.cmd = svn:eol-style=native; svn:keywords=Id; svn-mine-type=text/plain
*.js = svn:eol-style=native; svn:keywords=Id; svn:mime-type=text/javascript
*.php = svn:eol-style=native; svn:keywords=Id Rev Date; svn:mime-type=text/x-php
*.pl = svn:eol-style=native; svn:keywords=Id; svn:mime-type=text/x-perl; svn:executable
*.pm = svn:eol-style=native; svn:keywords=Id; svn:mime-type=text/x-perl
*.py = svn:eol-style=native; svn:keywords=Id; svn:mime-type=text/x-python; svn:executable
*.sh = svn:eol-style=native; svn:keywords=Id; svn:mime-type=text/x-sh; svn:executable
# Image formats
*.bmp = svn:mime-type=image/bmp
*.gif = svn:mime-type=image/gif
*.ico = svn:mime-type=image/ico
*.jpeg = svn:mime-type=image/jpeg
*.jpg = svn:mime-type=image/jpeg
*.png = svn:mime-type=image/png
*.tif = svn:mime-type=image/tiff
*.tiff = svn:mime-type=image/tiff
# Data formats
*.pdf = svn:mime-type=application/pdf
*.avi = svn:mime-type=video/avi
*.doc = svn:mime-type=application/msword
*.eps = svn:mime-type=application/postscript
*.gz = svn:mime-type=application/gzip
*.mov = svn:mime-type=video/quicktime
*.mp3 = svn:mime-type=audio/mpeg
*.ppt = svn:mime-type=application/vnd.ms-powerpoint
*.ps = svn:mime-type=application/postscript
*.psd = svn:mime-type=application/photoshop
*.rtf = svn:mime-type=text/rtf
*.swf = svn:mime-type=application/x-shockwave-flash
*.tgz = svn:mime-type=application/gzip
*.wav = svn:mime-type=audio/wav
*.xls = svn:mime-type=application/vnd.ms-excel
*.zip = svn:mime-type=application/zip
# Text formats
.htaccess = svn:mime-type=text/plain
*.css = svn:mime-type=text/css
*.dtd = svn:mime-type=text/xml
*.html = svn:mime-type=text/html
*.ini = svn:mime-type=text/plain
*.sql = svn:mime-type=text/x-sql
*.txt = svn:mime-type=text/plain
*.xhtml = svn:mime-type=text/xhtml+xml
*.xml = svn:mime-type=text/xml
*.xsd = svn:mime-type=text/xml
*.xsl = svn:mime-type=text/xml
*.xslt = svn:mime-type=text/xml
*.xul = svn:mime-type=text/xul
*.yml = svn:mime-type=text/plain
CHANGES = svn:mime-type=text/plain
COPYING = svn:mime-type=text/plain
INSTALL = svn:mime-type=text/plain
Makefile* = svn:mime-type=text/plain
README = svn:mime-type=text/plain
TODO = svn:mime-type=text/plain
# Code formats
*.c = svn:eol-style=native; svn:keywords=Id; svn:mime-type=text/plain
*.cpp = svn:eol-style=native; svn:keywords=Id; svn:mime-type=text/plain
*.h = svn:eol-style=native; svn:keywords=Id; svn:mime-type=text/plain
*.java = svn:eol-style=native; svn:keywords=Id; svn:mime-type=text/plain
*.as = svn:eol-style=native; svn:keywords=Id; svn:mime-type=text/plain
*.mxml = svn:eol-style=native; svn:keywords=Id; svn:mime-type=text/plain
# Webfonts
*.eot = svn:mime-type=application/vnd.ms-fontobject
*.woff = svn:mime-type=application/x-font-woff
*.ttf = svn:mime-type=application/x-font-truetype
*.svg = svn:mime-type=image/svg+xml
Creating a new project:
Step 1: I assume you already have a Google account, but if you don’t have one create it first in order to get access to Google Code.
Step 2: Go to
http://code.google.com and click on
Create a New Project.
Step 3: Now fill out the given form, set
Version control system to
Subversion and select a
Source code license.
Click on
Create Project. If everything gone well you will be redirect to new project’s dashboard
page.
Step 4: Now click on
Source tab and then click
googlecode.com password. It will be use to connect the software (TortoiseSVN) with your Google project.
Step 5: Record / Save the generated password for next step.
Starting upload & getting link:
Step 1: Once again do a right click on your desktop and select TortoiseSVN » Repo Browser.
Step 2: A new dialog box will appear. Paste your project URL in there.
URL pattern is always shaped like:
https://project_name.googlecode.com/svn/trunk/ Click OK. Wait for the loading process to be complete.
To be remembered and most often made failed in file upload: When writing the URL in the application project, using https, but when you want to see the results or access their work online, use the http.
Step 3: Open the folder in Repo Browser where you want to upload the file (.js).
Drag the file (what you want to upload) in there from your HDD.
Step 4: Here you have to
authenticate your Google account with the email & password you have saved before in
configuring application part.
Fill the prompted box with that email & pass, tick on
Save authenticate. So you do not need to repeatedly log in, when uploading another file in future.
Step 5: Your file should successfully uploaded in Google Code. And if it was, then it will look like screenshot below.
Step 6: Click on the file you just uploaded and
copy the link from address bar. This is your newly uploaded JavaScript file's direct link, what you have uploaded in Google Code.
Final Word:
This was the recommended way to upload javascript / css in google code. And you saw that its really easy than others. I also suggest you to use this method to upload / host your own projects in google code to avoid any kind of suspension.
Look friends in this post I've tried my best to make the post better understanding with maximum number of marked screenshots. I've also divided the whole process to upload javascript in google code in 3 parts for newbies to get better understanding.
And if its really helped you, then I'll request you
please consider few seconds to share this post on your social profile.