Skip to content

Commit

Permalink
Remove "--watch" from "build" command, move to new "watch" command
Browse files Browse the repository at this point in the history
  • Loading branch information
EpocDotFr committed Sep 9, 2024
1 parent 11815a3 commit bde7ab7
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions staticjinjaplus/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,12 +170,9 @@ def cli() -> None:

command_arg_parser = arg_parser.add_subparsers(dest='command', required=True)

build_arg_parser = command_arg_parser.add_parser('build', help='Build the site')
build_arg_parser.add_argument(
'-w', '--watch',
help='Automatically rebuild the site when templates are modified',
action='store_true'
)
command_arg_parser.add_parser('build', help='Build the site')

command_arg_parser.add_parser('watch', help='Build the site and watch for templates changes')

command_arg_parser.add_parser('clean', help='Delete and recreate the output directory')

Expand All @@ -186,7 +183,9 @@ def cli() -> None:
args = arg_parser.parse_args()

if args.command == 'build':
build(args.watch)
build()
elif args.command == 'watch':
build(True)
elif args.command == 'clean':
clean()
elif args.command == 'publish':
Expand Down

0 comments on commit bde7ab7

Please sign in to comment.