Skip to content

Commit

Permalink
Merge pull request #4659 from netchampfaris/fast-bench-build
Browse files Browse the repository at this point in the history
Faster bench build in development
  • Loading branch information
pratu16x7 committed Dec 20, 2017
2 parents a3669c8 + 1de429f commit 56bf543
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion frappe/build.js
Expand Up @@ -144,7 +144,7 @@ function get_compiled_file(file, output_path, minify, force_compile) {
file_content = minify_js(file_content, file);
}

if (file.endsWith('.js') && !file.includes('/lib/') && output_type === 'js' && !file.endsWith('class.js')) {
if (minify && file.endsWith('.js') && !file.includes('/lib/') && output_type === 'js' && !file.endsWith('class.js')) {
file_content = babelify(file_content, file, minify);
}

Expand Down
4 changes: 3 additions & 1 deletion frappe/commands/utils.py
Expand Up @@ -15,7 +15,9 @@ def build(make_copy=False, restore = False, verbose=False):
import frappe.build
import frappe
frappe.init('')
frappe.build.bundle(False, make_copy=make_copy, restore = restore, verbose=verbose)
# 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)

@click.command('watch')
def watch():
Expand Down

0 comments on commit 56bf543

Please sign in to comment.