diff --git a/bench/commands/make.py b/bench/commands/make.py index e30f23d5..b3ca8341 100755 --- a/bench/commands/make.py +++ b/bench/commands/make.py @@ -13,10 +13,11 @@ import click @click.option('--no-backups',is_flag=True, help="Run migrations for all sites in the bench") @click.option('--no-auto-update',is_flag=True, help="Build JS and CSS artifacts for the bench") @click.option('--skip-redis-config-generation', is_flag=True, help="Skip redis config generation if already specifying the common-site-config file") +@click.option('--skip-assets',is_flag=True, default=False, help="Do not build assets") @click.option('--verbose',is_flag=True, help="Verbose output during install") def init(path, apps_path, frappe_path, frappe_branch, no_procfile, no_backups, no_auto_update, clone_from, verbose, skip_redis_config_generation, clone_without_update, - ignore_exist = False, + ignore_exist = False, skip_assets=False, python = 'python3'): ''' Create a New Bench Instance. @@ -26,7 +27,7 @@ def init(path, apps_path, frappe_path, frappe_branch, no_procfile, no_backups, no_auto_update=no_auto_update, frappe_path=frappe_path, frappe_branch=frappe_branch, verbose=verbose, clone_from=clone_from, skip_redis_config_generation=skip_redis_config_generation, clone_without_update=clone_without_update, - ignore_exist = ignore_exist, + ignore_exist = ignore_exist, skip_assets=skip_assets, python = python) click.echo('Bench {} initialized'.format(path)) diff --git a/bench/utils.py b/bench/utils.py index cee84833..496410d3 100755 --- a/bench/utils.py +++ b/bench/utils.py @@ -37,7 +37,7 @@ def init(path, apps_path=None, no_procfile=False, no_backups=False, no_auto_update=False, frappe_path=None, frappe_branch=None, wheel_cache_dir=None, verbose=False, clone_from=None, skip_redis_config_generation=False, clone_without_update=False, - ignore_exist = False, + ignore_exist = False, skip_assets=False, python = 'python3'): # Let's change when we're ready. - from .app import get_app, install_apps_from_path from .config.common_site_config import make_config @@ -80,10 +80,12 @@ def init(path, apps_path=None, no_procfile=False, no_backups=False, bench.set_frappe_version(bench_path=path) if bench.FRAPPE_VERSION > 5: - update_node_packages(bench_path=path) + if not skip_assets: + update_node_packages(bench_path=path) set_all_patches_executed(bench_path=path) - build_assets(bench_path=path) + if not skip_assets: + build_assets(bench_path=path) if not skip_redis_config_generation: redis.generate_config(path)