storm-equal-height
Advanced tools
Comparing version 0.2.1 to 0.3.0
/** | ||
* @name storm-equal-height: Layout helper to equalise the height of a set of DOM elements | ||
* @version 0.1.0: Tue, 16 Feb 2016 20:19:41 GMT | ||
* @version 0.2.1: Wed, 24 Feb 2016 19:44:28 GMT | ||
* @author stormid | ||
@@ -5,0 +5,0 @@ * @license MIT |
@@ -1,1 +0,1 @@ | ||
!function(e,t){"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?module.exports=t():e.StormEqualHeight=t()}(this,function(){"use strict";function e(e,t){this.settings=l({},s,t),this.DOMElements=e,global.setTimeout(this.equalise.bind(this),0),global.addEventListener("resize",this.equalise.bind(this),!1)}function t(t,i){var n=[].slice.call(document.querySelectorAll(t));if(0===n.length)throw new Error("Equal Height cannot be initialised, no augmentable elements found");return n.forEach(function(t){o.push(new e([].slice.call(t.children),i))}),o}function i(e,i){n(),t(e,i)}function n(){o=null}var o,s={minWidth:768},l=require("merge");require("lodash.throttle");return e.prototype.equalise=function(){var e=0;this.DOMElements.forEach(function(t){t.style.height="auto",t.offsetHeight>e&&(e=t.offsetHeight)}),window.innerWidth<this.settings.minWidth||this.DOMElements.forEach(function(t){t.style.height=e+"px"})},{init:t,reload:i,destroy:n}}); | ||
!function(e,t){"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?module.exports=t():e.StormEqualHeight=t()}(this,function(){"use strict";function e(e,t){this.settings=l({},s,t),this.DOMElements=e,global.setTimeout(this.equalise.bind(this),0),global.addEventListener("resize",this.equalise.bind(this),!1)}function t(t,i){var n=[].slice.call(document.querySelectorAll(t));if(0===n.length)throw new Error("Equal Height cannot be initialised, no augmentable elements found");return n.forEach(function(t){o.push(new e([].slice.call(t.children),i))}),o}function i(e,i){n(),t(e,i)}function n(){o=null}var o=[],s={minWidth:768},l=require("merge");require("lodash.throttle");return e.prototype.equalise=function(){var e=0;this.DOMElements.forEach(function(t){t.style.height="auto",t.offsetHeight>e&&(e=t.offsetHeight)}),window.innerWidth<this.settings.minWidth||this.DOMElements.forEach(function(t){t.style.height=e+"px"})},{init:t,reload:i,destroy:n}}); |
@@ -41,3 +41,3 @@ /*global require*/ | ||
************************/ | ||
gulp.task('js', function() { | ||
gulp.task('js:copy', function() { | ||
return gulp.src('src/*.js') | ||
@@ -48,2 +48,14 @@ .pipe(header(banner, {pkg : pkg})) | ||
gulp.task('js:async', function() { | ||
return gulp.src('src/*.js') | ||
.pipe(header(banner, {pkg : pkg})) | ||
.pipe(browserify({ | ||
insertGlobals : true, | ||
debug : true | ||
})) | ||
.pipe(uglify()) | ||
.pipe(rename({suffix: '.async.min'})) | ||
.pipe(gulp.dest('dist')); | ||
}); | ||
gulp.task('js', ['js:copy', 'js:async']); | ||
gulp.task('compress', ['js'], function() { | ||
@@ -50,0 +62,0 @@ return gulp.src('src/*.js') |
{ | ||
"name": "storm-equal-height", | ||
"version": "0.2.1", | ||
"version": "0.3.0", | ||
"description": "Layout helper to equalise the height of a set of DOM elements", | ||
@@ -5,0 +5,0 @@ "author": "stormid", |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
199774
15
2457
5
5