mirror of
https://github.com/zulip/zulip.git
synced 2025-10-30 19:43:47 +00:00
webpack: Add --minify option to run-dev.py for to test minification.
This commit is contained in:
committed by
Tim Abbott
parent
1e5ce918e3
commit
28874cf26f
@@ -55,6 +55,10 @@ parser.add_option('--test',
|
||||
action='store_true', dest='test',
|
||||
help='Use the testing database and ports')
|
||||
|
||||
parser.add_option('--minify',
|
||||
action='store_true', dest='minify',
|
||||
help='Minifies assets for testing in dev')
|
||||
|
||||
parser.add_option('--interface',
|
||||
action='store', dest='interface',
|
||||
default=None, help='Set the IP or hostname for the proxy to listen on')
|
||||
@@ -186,7 +190,10 @@ if options.test:
|
||||
# for the Casper tests.
|
||||
subprocess.check_call('./tools/webpack')
|
||||
else:
|
||||
cmds += [['./tools/webpack', '--watch', '--port', str(webpack_port)]]
|
||||
webpack_cmd = ['./tools/webpack', '--watch', '--port', str(webpack_port)]
|
||||
if options.minify:
|
||||
webpack_cmd.append('--minify')
|
||||
cmds.append(webpack_cmd)
|
||||
for cmd in cmds:
|
||||
subprocess.Popen(cmd)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user