Skip to content

Commit

Permalink
Download zxcvbn.js rather than vendoring it.
Browse files Browse the repository at this point in the history
(imported from commit 8d55b6b903dc2292852636dfb444219b643b5f64)
  • Loading branch information
timabbott committed Sep 25, 2015
1 parent f318160 commit 9c0c5c5
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,6 @@ event_queues.json
.vagrant
/zproject/dev-secrets.conf
static/third/gemoji/
static/third/zxcvbn/
tools/emoji_dump/bitmaps/
tools/emoji_dump/*.ttx
4 changes: 0 additions & 4 deletions THIRDPARTY
Original file line number Diff line number Diff line change
Expand Up @@ -229,10 +229,6 @@ Files: static/third/zocial/*
Copyright: Sam Collins
License: Expat

Files: static/third/zxcvbn/*
Copyright: 2012-2015 Dan Wheeler and Dropbox, Inc.
License: Expat

Files: tools/inject-messages/othello
Copyright: Shakespeare
License: public-domain
Expand Down
1 change: 1 addition & 0 deletions provision.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ def main():
# Management commands expect to be run from the root of the project.
os.chdir(ZULIP_PATH)

os.system("tools/download-zxcvbn")
os.system("tools/emoji_dump/build_emoji")
os.system("generate_secrets.py -d")
sh.configure_rabbitmq(**LOUD)
Expand Down
4 changes: 4 additions & 0 deletions tools/download-zxcvbn
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh -ex

mkdir -p static/third/zxcvbn/
wget https://raw.githubusercontent.com/dropbox/zxcvbn/0890678ede1488ecb02cda7eb793cd308a59c49d/zxcvbn.js -o static/third/zxcvbn/zxcvbn.js
4 changes: 4 additions & 0 deletions tools/update-prod-static
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ subprocess.check_call(['python', 'tools/minify-js']
subprocess.check_call(['bash', '-ex', 'tools/emoji_dump/build_emoji'],
stdout=fp, stderr=fp)

# Download and include zxcvbn.js
subprocess.check_call(['bash', '-ex', 'tools/download-zxcvbn'],
stdout=fp, stderr=fp)

# Collect the files that we're going to serve.
subprocess.check_call(['python', './manage.py', 'collectstatic', '--noinput'],
stdout=fp, stderr=fp)
Expand Down

0 comments on commit 9c0c5c5

Please sign in to comment.