Mercurial > piecrust2
comparison piecrust/commands/builtin/baking.py @ 653:466bbddd121e
admin: Run the asset pipeline before showing the admin panel.
* This makes the compiled assets available for the site preview.
* Remove unneeded `--foodtruck` option to `bake`.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Thu, 18 Feb 2016 20:54:37 -0800 |
parents | c7ac7dc2fe73 |
children | 81d9c3a3a0b5 |
comparison
equal
deleted
inserted
replaced
652:41e9714e3a5f | 653:466bbddd121e |
---|---|
56 action='store_true') | 56 action='store_true') |
57 parser.add_argument( | 57 parser.add_argument( |
58 '--show-timers', | 58 '--show-timers', |
59 help="Show detailed timing information.", | 59 help="Show detailed timing information.", |
60 action='store_true') | 60 action='store_true') |
61 parser.add_argument( | |
62 '--foodtruck', | |
63 help="Run the asset pipeline for FoodTruck.", | |
64 action='store_true') | |
65 | 61 |
66 def run(self, ctx): | 62 def run(self, ctx): |
67 if ctx.args.foodtruck: | |
68 if ctx.args.html_only: | |
69 raise Exception("`--foodtruck` and `--html-only` can't be " | |
70 "both specified.") | |
71 if ctx.args.output: | |
72 raise Exception("`--foodtruck` and `--output` can't be " | |
73 "both specified.") | |
74 | |
75 ctx.args.assets_only = True | |
76 ctx.args.output = os.path.join(ctx.app.root_dir, CACHE_DIR, | |
77 'foodtruck', 'server') | |
78 | |
79 out_dir = (ctx.args.output or | 63 out_dir = (ctx.args.output or |
80 os.path.join(ctx.app.root_dir, '_counter')) | 64 os.path.join(ctx.app.root_dir, '_counter')) |
81 | 65 |
82 success = True | 66 success = True |
83 ctx.timers = {} | 67 ctx.timers = {} |