Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a setup.py file and static directories to package angular-treeRepeat's JS as an "app" for Django based websites #1

Open
wants to merge 21 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
**/.DS_Store
nbproject
manifest.mf
build.xml

.project
.settings
.idea/*
*.egg-info
*~
*.pot
*.py[co]
MANIFEST
dist/
docs/_build/
tests/coverage_html/
tests/.coverage
build/
6 changes: 6 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
recursive-include * *
recursive-exclude .git *
recursive-exclude wheel* *
recursive-exclude build *
recursive-exclude dist *
recursive-exclude ci_scripts *
1 change: 1 addition & 0 deletions PACKAGE_NAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
django_angular_treeRepeat
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Recursive repeater for AngularJS
## or how to build a tree by hand


[ ![Codeship Status for CaseRails/django-angular-treeRepeat](https://www.codeship.io/projects/f88a4640-5d62-0131-692d-2a0738b6ecf1/status?branch=master)](https://www.codeship.io/projects/11978)

Demo is here : http://tchatel.github.io/angular-treeRepeat/


Expand Down
Empty file added __init__.py
Empty file.
5 changes: 4 additions & 1 deletion app/js/directives.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
'use strict';
// Don't push this change upstream; it just attaches the
// tree directives to the CaseRails app rather than the demo app.
angular.module('caserailsApp.directives')
// End: Don't push

angular.module('app.directives', [])

// Main directive, that just publish a controller
.directive('tree', function ($parse, $animate) {
Expand Down
37 changes: 37 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
set -xe
#
# Check if PACKAGE_NAME is set, if not, load it from the file PACKAGE_NAME
#
if [ -z "$PACKAGE_NAME" ]
then
echo "Setting PACKAGE_NAME from file."
export PACKAGE_NAME=`cat PACKAGE_NAME`
fi

#
# Build and install ci_scripts
#
mkdir -p ~/.pip_cache
export ORIGINAL_HOME=`pwd`
export ORIGINAL_PACKAGE_NAME=$PACKAGE_NAME
export PIP_DOWNLOAD_CACHE=~/.pip_cache/
export PIP_FIND_LINKS="$PIP_DOWNLOAD_CACHE"
pip install --upgrade pip setuptools setuptools_git
export PIP=`which pip`
git clone https://github.com/CaseRails/ci_scripts.git
cd ci_scripts
./build.sh
./test.sh
cd $ORIGINAL_HOME
export PACKAGE_NAME=$ORIGINAL_PACKAGE_NAME
$PIP install ci_scripts
#
# End installation of ci_scripts
#
python setup.py clean
#python setup.py bdist_wheel
#python setup.py bdist_egg
python setup.py sdist
#cp dist/*.egg $PIP_DOWNLOAD_CACHE
#cp dist/*.whl $PIP_DOWNLOAD_CACHE
cp dist/* $PIP_DOWNLOAD_CACHE
5 changes: 5 additions & 0 deletions deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
set -e
export PIP_DOWNLOAD_CACHE=~/.pip_cache/
export PIP_FIND_LINKS="$PIP_DOWNLOAD_CACHE"
pip install --upgrade $PACKAGE_NAME
echo "from ci_scripts import deploy" | python
14 changes: 14 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
from setuptools import setup, find_packages

setup(
name='django_angular_treeRepeat',
version='0.0.1',
packages=['django_angular_treeRepeat'],
package_dir={'django_angular_treeRepeat':'.'},
package_data={'django_angular_treeRepeat':['static/treeRepeat/js/*.js',],},
zip_safe=False,
platforms='any',
setup_requires=('ci_scripts'),
install_requires=('ci_scripts'),

)
1 change: 1 addition & 0 deletions static/treeRepeat/js
5 changes: 5 additions & 0 deletions test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
set -e
export PIP_DOWNLOAD_CACHE=~/.pip_cache/
export PIP_FIND_LINKS="$PIP_DOWNLOAD_CACHE"
pip install --upgrade $PACKAGE_NAME
echo "import $PACKAGE_NAME; print 'Hello World';" | python
1 change: 1 addition & 0 deletions test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Testing