Mercurial > piecrust2
diff piecrust/commands/builtin/baking.py @ 220:84e2bc2d16cb
bake: Change arguments to selectively bake to make them symmetrical.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Tue, 03 Feb 2015 08:20:30 -0800 |
parents | 10f24c62b05b |
children | f82262f59600 |
line wrap: on
line diff
--- a/piecrust/commands/builtin/baking.py Mon Feb 02 08:34:44 2015 -0800 +++ b/piecrust/commands/builtin/baking.py Tue Feb 03 08:20:30 2015 -0800 @@ -32,8 +32,12 @@ help="Force re-baking the entire website.", action='store_true') parser.add_argument( - '--no-assets', - help="Don't process assets (only pages).", + '--assets-only', + help="Only bake the assets (don't bake the web pages).", + action='store_true') + parser.add_argument( + '--html-only', + help="Only bake HTML files (don't run the asset pipeline).", action='store_true') def run(self, ctx): @@ -44,10 +48,11 @@ start_time = time.clock() try: # Bake the site sources. - success = success & self._bakeSources(ctx, out_dir) + if not ctx.args.assets_only: + success = success & self._bakeSources(ctx, out_dir) # Bake the assets. - if not ctx.args.no_assets: + if not ctx.args.html_only: success = success & self._bakeAssets(ctx, out_dir) # All done.