Browse Source

Merge branch 'master' into gh-pages

v1
David DeSandro 11 years ago
parent
commit
e03d4dd7ab
  1. 2
      README.mdown
  2. 15
      jquery.isotope.js
  3. 6
      jquery.isotope.min.js
  4. 10
      minify.sh

2
README.mdown

@ -61,4 +61,4 @@ View the [commit history](https://github.com/desandro/isotope/commits/master/jqu
* * * * * *
Copyright (c) 2011-2012 David DeSandro / Metafizzy LLC Copyright (c) 2011-2014 David DeSandro / Metafizzy LLC

15
jquery.isotope.js

@ -1,5 +1,5 @@
/** /**
* Isotope v1.5.25 * Isotope v1.5.26
* An exquisite jQuery plugin for magical layouts * An exquisite jQuery plugin for magical layouts
* http://isotope.metafizzy.co * http://isotope.metafizzy.co
* *
@ -8,7 +8,7 @@
* *
* Non-commercial use is licensed under the MIT License * Non-commercial use is licensed under the MIT License
* *
* Copyright 2013 Metafizzy * Copyright 2014 Metafizzy
*/ */
/*jshint asi: true, browser: true, curly: true, eqeqeq: true, forin: false, immed: false, newcap: true, noempty: true, strict: true, undef: true */ /*jshint asi: true, browser: true, curly: true, eqeqeq: true, forin: false, immed: false, newcap: true, noempty: true, strict: true, undef: true */
@ -20,6 +20,7 @@
// get global vars // get global vars
var document = window.document; var document = window.document;
var docElem = document.documentElement;
var Modernizr = window.Modernizr; var Modernizr = window.Modernizr;
// helper function // helper function
@ -33,7 +34,7 @@
var prefixes = 'Moz Webkit O Ms'.split(' '); var prefixes = 'Moz Webkit O Ms'.split(' ');
var getStyleProperty = function( propName ) { var getStyleProperty = function( propName ) {
var style = document.documentElement.style, var style = docElem.style,
prefixed; prefixed;
// test standard property first // test standard property first
@ -86,11 +87,9 @@
csstransforms3d: function() { csstransforms3d: function() {
var test = !!getStyleProperty('perspective'); var test = !!getStyleProperty('perspective');
// double check for Chrome's false positive // double check for Chrome's false positive
if ( test ) { if ( test && 'webkitPerspective' in docElem.style ) {
var vendorCSSPrefixes = ' -o- -moz- -ms- -webkit- -khtml- '.split(' '), var $style = $('<style>@media (transform-3d),(-webkit-transform-3d)' +
mediaQuery = '@media (' + vendorCSSPrefixes.join('transform-3d),(') + 'modernizr)', '{#modernizr{height:3px}}</style>').appendTo('head'),
$style = $('<style>' + mediaQuery + '{#modernizr{height:3px}}' + '</style>')
.appendTo('head'),
$div = $('<div id="modernizr" />').appendTo('html'); $div = $('<div id="modernizr" />').appendTo('html');
test = $div.height() === 3; test = $div.height() === 3;

6
jquery.isotope.min.js vendored

File diff suppressed because one or more lines are too long

10
minify.sh

@ -1,15 +1,9 @@
#!/bin/bash #!/bin/bash
# minifies jquery.isotope.js # minifies jquery.isotope.js
# requires nodejs & uglifyjs # requires nodejs & uglify-js
IN=jquery.isotope.js IN=jquery.isotope.js
OUT=jquery.isotope.min.js OUT=jquery.isotope.min.js
# remove any lines that begin with /*jshint or /*global uglifyjs $IN --compress conditionals=true --mangle --comments --output $OUT
# then, minify with Uglify JS
# then, add newline characters after `*/`, but not last newline character
awk '!/^\/\*[jshint|global]/' $IN \
| uglifyjs \
| awk '{ORS=""; gsub(/\*\//,"*/\n"); if (NR!=1) print "\n"; print;}' > $OUT
echo "Minified" $IN "as" $OUT

Loading…
Cancel
Save