[Pkg-mozext-commits] [jpm.sh] 31/43: Improved code minifier

Hema Prathaban hemaprathaban-guest at moszumanska.debian.org
Thu Aug 17 07:52:36 UTC 2017


This is an automated email from the git hooks/post-receive script.

hemaprathaban-guest pushed a commit to branch master
in repository jpm.sh.

commit 078ec04fbce32f6b177bc900e3a4bbc9abc4da08
Author: nord-stream <nord-stream at ochaken.jp.eu.org>
Date:   Fri Mar 18 05:38:29 2016 +0000

    Improved code minifier
---
 lib/code-minifier.sh | 2 +-
 lib/xpi.sh           | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/code-minifier.sh b/lib/code-minifier.sh
index 0b969b6..2451aa9 100644
--- a/lib/code-minifier.sh
+++ b/lib/code-minifier.sh
@@ -50,7 +50,7 @@ jpmMinifyJs () {
 	# This new JS minifier tries to preserve line numbers.
 	# It just removes some spaces and comments.
 	jpmConsoleLog "Minifying JS files..."
-	js_sed='s/^\s*$//'
+	js_sed='s/\s*$//'
 	find "$aDir" -type f -name '*.js' -execdir \
 		sh -c \
 		'sed "$1" < "$2" > "$2.tmp" && mv -f "$2.tmp" "$2"' \
diff --git a/lib/xpi.sh b/lib/xpi.sh
index abb277a..fb73b5b 100644
--- a/lib/xpi.sh
+++ b/lib/xpi.sh
@@ -93,7 +93,7 @@ jpmXpiBuild () (
 		jpmConsoleLog "xpi-build: Excluding development files..."
 		rm -fr "$buildDir/debug.js" "$buildDir/data/debug" >&2
 		
-		preprocess_sed='s|^\s\{0,\}/\*!_DEBUGONLY_!.*||'
+		preprocess_sed='s,^\s*/\*!_DEBUGONLY_!.*,,'
 		find "$buildDir" -name '*.js' -exec \
 			sh -c 'sed "$1" < "$2" > "$2.tmp" && mv -f "$2.tmp" "$2"' \
 				-- "$preprocess_sed" {} \;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/jpm.sh.git



More information about the Pkg-mozext-commits mailing list