Merge remote-tracking branch 'origin/master'

This commit is contained in:
Austin Clark 2015-08-17 10:49:08 -06:00
commit 767b75faf5
4 changed files with 13 additions and 4 deletions

View File

@ -4,3 +4,5 @@ exclude .gitignore
exclude .gitreview
global-exclude *.pyc
graft stackviz/static/components

View File

@ -9,7 +9,7 @@ Installation
============
Installation of the frontend requires Node.js and Bower. On Ubuntu::
sudo apt-get install nodejs npm
sudo apt-get install nodejs npm nodejs-legacy
sudo npm install -g bower
Then, install the Bower components by running, from the project directory::

View File

@ -24,6 +24,10 @@ classifier =
packages =
stackviz
[entry_points]
console_scripts =
stackviz-export = stackviz.export:main
[build_sphinx]
source-dir = doc/source
build-dir = doc/build

View File

@ -35,6 +35,9 @@ EXPORT_PATHS = [
]
_base = os.path.dirname(os.path.abspath(__file__))
def fake_render_view(path):
factory = RequestFactory()
request = factory.get(path)
@ -107,7 +110,7 @@ def main():
args = parser.parse_args()
if not args.ignore_bower:
if not os.listdir(os.path.join('stackviz', 'static', 'components')):
if not os.listdir(os.path.join(_base, 'static', 'components')):
print("Bower components have not been installed, please run "
"`bower install`")
return 1
@ -116,13 +119,13 @@ def main():
if os.listdir(args.path):
print("Destination exists and is not empty, cannot continue")
return 1
else:
os.mkdir(args.path)
init_django(args)
print("Copying static files ...")
shutil.copytree(os.path.join('stackviz', 'static'),
shutil.copytree(os.path.join(_base, 'static'),
os.path.join(args.path, 'static'))
for path in EXPORT_PATHS: