2

I'm starting a project using Play Framework 2.0 and Dojo 1.8 and I'm going to use Git for version control. I wanted to know if it is a good practice to version Dojo files along with my project, since it is a huge library.

Cesar Barata
  • 321
  • 2
  • 6
  • 1
    It is a good practice to have your *complete* project after checking it out from your version control system, without additional manual steps. If not a maven project (no idea what a play+dojo project looks like), I would put dojo files under source control. – Assen Kolov Sep 21 '12 at 15:14

1 Answers1

2

There is the official read-only mirror of Dojo at GitHub: https://github.com/dojo. Add dojo, dijit, dojox and util as submodules to your project repository:

# create project directory
mkdir MyProject
cd MyProject

# init git repository
git init

# add git submodule
mkdir src
git submodule add https://github.com/dojo/dojo.git src/dojo

# switch to the particular dojo version
# use `git tag` inside the submodule directory to list available versions 
cd src/dojo
git checkout 1.8.0

# repeat previous two steps for dijit, dojox, util (if necessary):
# https://github.com/dojo/dijit.git
# https://github.com/dojo/dojox.git
# https://github.com/dojo/util.git

# commit changes
cd ../..
git add .
git commit -m "added dojo submodule and moved it to the version 1.8.0"

# push if applicable

These are two stackoverflow answers I got inspired by when I had the same question some time ago:

Together with the aforementioned I employ A successful Git branching model, which is great, but a bit more tricky to setup. I can add a step by step instructions like those above, if you are interested.

Community
  • 1
  • 1
phusick
  • 7,342
  • 1
  • 21
  • 26