From 9df42dc856f880c959646b9e4991a6d2c1b76a2d Mon Sep 17 00:00:00 2001 From: Mike Causer Date: Fri, 14 Feb 2014 11:02:08 +1100 Subject: [PATCH] Adds user configurable timeout --- Minifier.sublime-settings | 5 ++++- Minify.py | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Minifier.sublime-settings b/Minifier.sublime-settings index 0f183c9..8a75873 100644 --- a/Minifier.sublime-settings +++ b/Minifier.sublime-settings @@ -14,5 +14,8 @@ "compiler": "google_closure", // when you create a file you want to automatically open it? - "open_on_min": true + "open_on_min": true, + + // timeout in seconds + "timeout": 5 } diff --git a/Minify.py b/Minify.py index 17ea2b6..0d86a85 100644 --- a/Minify.py +++ b/Minify.py @@ -25,7 +25,7 @@ def run(self, edit): thread = CompilerCall( sel, selbody, - timeout=5, + timeout=self.settings.get('timeout', 5), level=self.settings.get('optimization_level', "WHITESPACE_ONLY"), rm_new_lines=self.settings.get('remove_new_lines', False))