A simple line code that makes adding folders to the exclusion of Dropbox sync.
find `pwd` -type d -regex ".*\(node_modules\|temp\|tmp\|bower_components\|cache\)$" -prune -exec dropbox-cli exclude add {} \;
After your Dropbox properly installed, configure your dropbox.py file to enable dropbox-cli command line.
In Ubuntu, instead of using the dropbox.py, you can install the nautilus-dropbox metapackage.
sudo apt-get install nautilus-dropbox -y
This enable the ´dropbox´ command, and ours ignore script looks like this:
find `pwd` -type d -regex ".*\(node_modules\|temp\|tmp\|bower_components\|cache\)$" -prune -exec dropbox exclude add {} \;
Thanks for Vincent Voyer