webpack: Add --minify option to run-dev.py for to test minification.

This commit is contained in:
Pweaver (Paul Weaver)
2017-06-10 14:28:48 -04:00
committed by Tim Abbott
parent 1e5ce918e3
commit 28874cf26f
3 changed files with 21 additions and 7 deletions

View File

@@ -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)