This document describes how to develop for DrupalGap core (or hack it to do what you want). It is intended for an intermediate/advanced audience.
Before continuing onward with this guide, we highly recommend forking DrupalGap on GitHub.com.
This will allow you to easily "pull" in new code from DrupalGap core as it is improved, and will allow you to "push" new code to DrupalGap core to make it better for everyone.
Instead of hacking core, the DrupalGap team would love to hear why it needs to be done. There may be a way to do it without changing the core code, or if it is necessary, it would be wonderful to share your code changes to benefit everyone. Of course there are times when pleasing everyone isn't possible, so feel free to hack away ;)
Compiling the drupalgap.js file
The actual source code for DrupalGap core is located here:
After making any modifications to DrupalGap core in the
src directory, the
bin/drupalgap.js file needs to be rebuilt using the makefile. Navigate to your app's www directory and then run the makefile:
cd www make
If there are any problems during the make, the error messages will be output to the terminal window.
index.html file for our app:
Now we're ready to begin developing inside DrupalGap core.
Pulling Latest Changes
After you've made a fork of DrupalGap, chances are you'll eventually need to pull the latest changes into your fork. It can be done with these terminal commands:
git remote -v git remote add upstream https://github.com/signalpoint/DrupalGap.git git remote -v git fetch upstream git merge upstream/7.x-1.x git log
See these two pages for more details: