build script: add watch mode
This commit is contained in:
parent
c1acbc114b
commit
709220eb10
|
@ -20,6 +20,7 @@ TARGETS = [
|
|||
def main():
|
||||
p = argparse.ArgumentParser()
|
||||
p.add_argument('--release', action='store_true', help="Use release flavor of build")
|
||||
p.add_argument('--watch' , action='store_true')
|
||||
p.add_argument('--lint' , action='store_true')
|
||||
p.add_argument('--publish', action='store_true', help="Publish on chrome web store/addons.mozilla.org")
|
||||
|
||||
|
@ -51,6 +52,14 @@ def main():
|
|||
'PUBLISH': 'YES' if args.publish else 'NO',
|
||||
**os.environ,
|
||||
}
|
||||
|
||||
if args.watch:
|
||||
check_call([
|
||||
'npm', 'run', 'watch',
|
||||
], env=env, cwd=str(Path(__file__).absolute().parent))
|
||||
# TODO exec instead?
|
||||
return
|
||||
|
||||
check_call([
|
||||
'npm', 'run', 'build',
|
||||
], env=env, cwd=str(Path(__file__).absolute().parent))
|
||||
|
|
Loading…
Reference in a new issue