Skip to content

Commit

Permalink
🐞 Fix AMD file paths. Fixes #1088
Browse files Browse the repository at this point in the history
Same issue as metafizzy/packery#372

👷 build v3.0.1
⬆️ update ev-emitter v1.0.3, fizzy-ui-utils v2.0.2
  • Loading branch information
desandro committed Jun 8, 2016
1 parent 812c3f8 commit 98ba374
Show file tree
Hide file tree
Showing 7 changed files with 313 additions and 30 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ See [isotope.metafizzy.co](http://isotope.metafizzy.co) for complete docs and de

### CDN

Link directly to [Isotope files on cdnjs](https://cdnjs.com/libraries/jquery.isotope).
Link directly to Isotope files on [npmcdn](https://npmcdn.com).

``` html
<script src="https://npmcdn.com/[email protected]/dist/isotope.pkgd.min.js"></script>
Expand Down
45 changes: 23 additions & 22 deletions dist/isotope.pkgd.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Isotope PACKAGED v3.0.0
* Isotope PACKAGED v3.0.1
*
* Licensed GPLv3 for open source use
* or Isotope Commercial License for commercial use
Expand Down Expand Up @@ -154,7 +154,7 @@ return jQueryBridget;
}));

/**
* EvEmitter v1.0.2
* EvEmitter v1.0.3
* Lil' event emitter
* MIT License
*/
Expand All @@ -163,7 +163,7 @@ return jQueryBridget;

( function( global, factory ) {
// universal module definition
/* jshint strict: false */ /* globals define, module */
/* jshint strict: false */ /* globals define, module, window */
if ( typeof define == 'function' && define.amd ) {
// AMD - RequireJS
define( 'ev-emitter/ev-emitter',factory );
Expand All @@ -175,7 +175,7 @@ return jQueryBridget;
global.EvEmitter = factory();
}

}( this, function() {
}( typeof window != 'undefined' ? window : this, function() {



Expand Down Expand Up @@ -528,7 +528,7 @@ return getSize;
}));

/**
* Fizzy UI utils v2.0.1
* Fizzy UI utils v2.0.2
* MIT license
*/

Expand Down Expand Up @@ -699,7 +699,8 @@ utils.debounceMethod = function( _class, methodName, threshold ) {
// ----- docReady ----- //

utils.docReady = function( callback ) {
if ( document.readyState == 'complete' ) {
var readyState = document.readyState;
if ( readyState == 'complete' || readyState == 'interactive' ) {
callback();
} else {
document.addEventListener( 'DOMContentLoaded', callback );
Expand Down Expand Up @@ -2266,7 +2267,7 @@ return Outlayer;
/* jshint strict: false */ /*globals define, module, require */
if ( typeof define == 'function' && define.amd ) {
// AMD
define( 'isotope/item',[
define( 'isotope/js/item',[
'outlayer/outlayer'
],
factory );
Expand Down Expand Up @@ -2344,7 +2345,7 @@ return Item;
/* jshint strict: false */ /*globals define, module, require */
if ( typeof define == 'function' && define.amd ) {
// AMD
define( 'isotope/layout-mode',[
define( 'isotope/js/layout-mode',[
'get-size/get-size',
'outlayer/outlayer'
],
Expand Down Expand Up @@ -2710,7 +2711,7 @@ return Item;
/* jshint strict: false */ /*globals define, module, require */
if ( typeof define == 'function' && define.amd ) {
// AMD
define( 'isotope/layout-modes/masonry',[
define( 'isotope/js/layout-modes/masonry',[
'../layout-mode',
'masonry/masonry'
],
Expand Down Expand Up @@ -2783,7 +2784,7 @@ return Item;
/* jshint strict: false */ /*globals define, module, require */
if ( typeof define == 'function' && define.amd ) {
// AMD
define( 'isotope/layout-modes/fit-rows',[
define( 'isotope/js/layout-modes/fit-rows',[
'../layout-mode'
],
factory );
Expand Down Expand Up @@ -2852,7 +2853,7 @@ return FitRows;
/* jshint strict: false */ /*globals define, module, require */
if ( typeof define == 'function' && define.amd ) {
// AMD
define( 'isotope/layout-modes/vertical',[
define( 'isotope/js/layout-modes/vertical',[
'../layout-mode'
],
factory );
Expand Down Expand Up @@ -2899,7 +2900,7 @@ return Vertical;
}));

/*!
* Isotope v3.0.0
* Isotope v3.0.1
*
* Licensed GPLv3 for open source use
* or Isotope Commercial License for commercial use
Expand All @@ -2918,12 +2919,12 @@ return Vertical;
'get-size/get-size',
'desandro-matches-selector/matches-selector',
'fizzy-ui-utils/utils',
'./item',
'./layout-mode',
'isotope/js/item',
'isotope/js/layout-mode',
// include default layout modes
'./layout-modes/masonry',
'./layout-modes/fit-rows',
'./layout-modes/vertical'
'isotope/js/layout-modes/masonry',
'isotope/js/layout-modes/fit-rows',
'isotope/js/layout-modes/vertical'
],
function( Outlayer, getSize, matchesSelector, utils, Item, LayoutMode ) {
return factory( window, Outlayer, getSize, matchesSelector, utils, Item, LayoutMode );
Expand All @@ -2936,12 +2937,12 @@ return Vertical;
require('get-size'),
require('desandro-matches-selector'),
require('fizzy-ui-utils'),
require('./item'),
require('./layout-mode'),
require('isotope/js/item'),
require('isotope/js/layout-mode'),
// include default layout modes
require('./layout-modes/masonry'),
require('./layout-modes/fit-rows'),
require('./layout-modes/vertical')
require('isotope/js/layout-modes/masonry'),
require('isotope/js/layout-modes/fit-rows'),
require('isotope/js/layout-modes/vertical')
);
} else {
// browser global
Expand Down
6 changes: 3 additions & 3 deletions dist/isotope.pkgd.min.js

Large diffs are not rendered by default.

11 changes: 9 additions & 2 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ function addBanner( str ) {
var rjsOptimize = require('gulp-requirejs-optimize');

gulp.task( 'requirejs', function() {
var definitionRE = /define\(\s*'isotope\/isotope'(.|\n)+\],/;
var banner = getBanner();
// HACK src is not needed
// should refactor rjsOptimize to produce src
Expand All @@ -72,8 +73,14 @@ gulp.task( 'requirejs', function() {
jquery: 'empty:'
}
}) )
// remove named module
.pipe( replace( "'isotope/isotope',", '' ) )
// munge AMD definition
.pipe( replace( definitionRE, function( definition ) {
// remove named module
return definition.replace( "'isotope/isotope',", '' )
// use explicit file paths, './item' -> 'isotope/js/item'
.replace( /'.\//g, "'isotope/js/" );
}) )
.pipe( replace( "define( 'isotope/", "define( 'isotope/js/" ) )
// add banner
.pipe( addBanner( banner ) )
.pipe( rename('isotope.pkgd.js') )
Expand Down
2 changes: 1 addition & 1 deletion js/isotope.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Isotope v3.0.0
* Isotope v3.0.1
*
* Licensed GPLv3 for open source use
* or Isotope Commercial License for commercial use
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "isotope-layout",
"version": "3.0.0",
"version": "3.0.1",
"description": "Filter and sort magical layouts",
"main": "js/isotope.js",
"dependencies": {
Expand Down
Loading

0 comments on commit 98ba374

Please sign in to comment.