Skip to content
Browse files

Creating a build folder to minify the script. Also removed some white…

…space that failed linting.
  • Loading branch information...
1 parent 414dd0a commit 30a6a44c9778b7c8c93561f2b32a8a6def92c9a5 georgepaterson committed
View
41 build/build.sh
@@ -0,0 +1,41 @@
+
+# Execute with sudo ./build.sh
+
+scriptdir=`dirname $BASH_SOURCE`
+cd $scriptdir
+
+echo 'Create build/release folder'
+mkdir release
+
+echo 'Test ../script/*.js with JSLint'
+java -jar lib/jslint4java-1.4.7.jar ../script/*.js
+echo 'JSLint test complete'
+
+echo 'Concatenate ../script/*.js files'
+cat ../script/*.js \
+> release/temp.js
+
+echo 'Compress concatenated JavaScript file with YUI Compressor'
+java -jar lib/yuicompressor-2.4.2.jar \
+--type js \
+--charset UTF-8 \
+--preserve-semi \
+-o release/jquery.videobackground.min.js release/temp.js
+
+echo 'Remove temp concatenated JavaScript file'
+rm release/temp.js
+
+# echo 'Compress CSS file with YUI Compressor'
+# java -jar lib/yuicompressor-2.4.2.jar \
+# --type css \
+# --charset UTF-8 \
+# --preserve-semi \
+# -o release/jquery.imageviewer.min.css ../themes/base/jquery.imageviewer.css
+
+# echo 'Compress PNG files with ImageOptim'
+# -a ImageOptim.app ../themes/images/*.png
+
+# echo 'Copy PNG files for release'
+# cp ../themes/base/images/*.png release/images
+
+echo 'Build complete'
View
BIN build/lib/jslint4java-1.4.7.jar
Binary file not shown.
View
BIN build/lib/yuicompressor-2.4.2.jar
Binary file not shown.
View
6 script/jquery.videobackground.js
@@ -166,13 +166,13 @@
*/
resizeVideo: function() {
var documentHeight = $(document).height(),
- windowHeight = $(window).height();
+ windowHeight = $(window).height();
if (windowHeight >= documentHeight) {
$(self).css('height', windowHeight);
}
else if (documentHeight > windowHeight) {
$(self).css('height', documentHeight);
- }
+ }
},
/*
* Video events.
@@ -253,4 +253,4 @@
}
};
-})( jQuery );
+})( jQuery );

0 comments on commit 30a6a44

Please sign in to comment.
Something went wrong with that request. Please try again.