Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
767b75faf5
|
@ -4,3 +4,5 @@ exclude .gitignore
|
|||
exclude .gitreview
|
||||
|
||||
global-exclude *.pyc
|
||||
|
||||
graft stackviz/static/components
|
||||
|
|
|
@ -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::
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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:
|
Loading…
Reference in New Issue