[Pkg-javascript-commits] [jqueryui] 01/05: Create jquery-ui-i18n.js

Paul Mathijs Gevers elbrus at moszumanska.debian.org
Wed Nov 30 20:35:36 UTC 2016


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

elbrus pushed a commit to branch master
in repository jqueryui.

commit 8c3597127e3b133722f71f7db1eee0b5ba2ef056
Author: Paul Gevers <elbrus at debian.org>
Date:   Wed Nov 30 19:59:43 2016 +0100

    Create jquery-ui-i18n.js
    
    Closes: #845647
---
 debian/clean |  1 +
 debian/rules | 19 ++++++++++++++++++-
 2 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/debian/clean b/debian/clean
index 6b887ba..fe254ef 100644
--- a/debian/clean
+++ b/debian/clean
@@ -4,3 +4,4 @@ themes/base/*.min.css
 themes/base/jquery-ui.css
 ui/*.min.js
 ui/*/*.min.js
+ui/i18n/jquery-ui-i18n.js
diff --git a/debian/rules b/debian/rules
index da38161..489b49a 100755
--- a/debian/rules
+++ b/debian/rules
@@ -12,7 +12,7 @@ override_dh_auto_configure:
 	find demos -name "*.html" -exec sed --in-place "s#\.\./\.\./external/requirejs/require\.js#/usr/lib/nodejs/require.js#" {} \;
 	dh_auto_configure
 
-override_dh_auto_build: jquery-ui.js jquery-ui.min.js themes/base/jquery-ui.css
+override_dh_auto_build: jquery-ui.js jquery-ui.min.js themes/base/jquery-ui.css ui/i18n/jquery-ui-i18n.js
 	for file in $$(find ui -name '*.js'); do \
 		uglifyjs $$file --output $${file%.js}.min.js --compress; \
 	done
@@ -64,9 +64,26 @@ themes/base/jquery-ui.css:
 # Strip copyright block per file in concatentated file
 	sed -i -e 's#^/\*!$$##; s#^ \*.*##; s#^ \*$$##' $@
 
+ui/i18n/jquery-ui-i18n.js:
+	# Replace newline with \r to ease use of sed (I don't know well enough how
+	# to achieve the same thing in the hold space).
+	for file in ui/i18n/datepicker*.js ; do \
+		cat $${file} | tr '\n' '\r' | \
+		sed -e 's/( function( factory.*function( datepicker ) {//' \
+			-e 's/datepicker\.regional/jQuery(function($$){\r\t&/' \
+			-e 's/\(datepicker\.regional\)\.\([[:alpha:]-]*\)/\1["\2"]/g' \
+			-e 's/\rreturn datepicker.*\r\r} ) );\r//' \
+			-e 's/datepicker\./$$.&/g' | \
+		tr '\r' '\n' > $${file}.tmp ; \
+		echo '});' >> $${file}.tmp ; \
+	done
+	cat ui/i18n/datepicker*.tmp > $@
+	$(RM) ui/i18n/datepicker*.tmp
+
 override_dh_auto_test: jquery-ui.js jquery-ui.min.js themes/base/jquery-ui.css
 	nodejs --check jquery-ui.js
 	nodejs --check jquery-ui.min.js
+	nodejs --check ui/i18n/jquery-ui-i18n.js
 # Reference files are taken from the quick download ZIP file from
 # http://jqueryui.com
 	diff -Bw debian/reference-jquery-ui.js jquery-ui.js

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/jqueryui.git



More information about the Pkg-javascript-commits mailing list