|
|
@@ -10,17 +10,18 @@ from frappe.utils import update_progress_bar |
|
|
|
from frappe.utils.response import json_handler |
|
|
|
|
|
|
|
@click.command('build') |
|
|
|
@click.option('--app', help='Build assets for app') |
|
|
|
@click.option('--make-copy', is_flag=True, default=False, help='Copy the files instead of symlinking') |
|
|
|
@click.option('--restore', is_flag=True, default=False, help='Copy the files instead of symlinking with force') |
|
|
|
@click.option('--verbose', is_flag=True, default=False, help='Verbose') |
|
|
|
def build(make_copy=False, restore = False, verbose=False): |
|
|
|
def build(app=None, make_copy=False, restore = False, verbose=False): |
|
|
|
"Minify + concatenate JS and CSS files, build translations" |
|
|
|
import frappe.build |
|
|
|
import frappe |
|
|
|
frappe.init('') |
|
|
|
# don't minify in developer_mode for faster builds |
|
|
|
no_compress = frappe.local.conf.developer_mode or False |
|
|
|
frappe.build.bundle(no_compress, make_copy=make_copy, restore = restore, verbose=verbose) |
|
|
|
frappe.build.bundle(no_compress, app=app, make_copy=make_copy, restore = restore, verbose=verbose) |
|
|
|
|
|
|
|
@click.command('watch') |
|
|
|
def watch(): |
|
|
|