Browse Source

🛠 UMD use inline hint, check module

pull/1127/head
David DeSandro 9 years ago
parent
commit
407fac91a1
  1. 7
      .jshintrc
  2. 5
      js/isotope.js
  3. 4
      js/item.js
  4. 5
      js/layout-mode.js
  5. 2
      js/layout-modes/fit-rows.js
  6. 4
      js/layout-modes/masonry.js
  7. 4
      js/layout-modes/vertical.js

7
.jshintrc

@ -3,10 +3,5 @@
"devel": false, "devel": false,
"strict": true, "strict": true,
"undef": true, "undef": true,
"unused": true, "unused": true
"globals": {
"define": false,
"module": false,
"require": false
}
} }

5
js/isotope.js

@ -9,9 +9,8 @@
*/ */
( function( window, factory ) { ( function( window, factory ) {
'use strict';
// universal module definition // universal module definition
/* jshint strict: false */ /*globals define, module, require */
if ( typeof define == 'function' && define.amd ) { if ( typeof define == 'function' && define.amd ) {
// AMD // AMD
define( [ define( [
@ -29,7 +28,7 @@
function( Outlayer, getSize, matchesSelector, utils, Item, LayoutMode ) { function( Outlayer, getSize, matchesSelector, utils, Item, LayoutMode ) {
return factory( window, Outlayer, getSize, matchesSelector, utils, Item, LayoutMode ); return factory( window, Outlayer, getSize, matchesSelector, utils, Item, LayoutMode );
}); });
} else if ( typeof exports == 'object' ) { } else if ( typeof module == 'object' && module.exports ) {
// CommonJS // CommonJS
module.exports = factory( module.exports = factory(
window, window,

4
js/item.js

@ -3,15 +3,15 @@
**/ **/
( function( window, factory ) { ( function( window, factory ) {
'use strict';
// universal module definition // universal module definition
/* jshint strict: false */ /*globals define, module, require */
if ( typeof define == 'function' && define.amd ) { if ( typeof define == 'function' && define.amd ) {
// AMD // AMD
define( [ define( [
'outlayer/outlayer' 'outlayer/outlayer'
], ],
factory ); factory );
} else if ( typeof exports == 'object' ) { } else if ( typeof module == 'object' && module.exports ) {
// CommonJS // CommonJS
module.exports = factory( module.exports = factory(
require('outlayer') require('outlayer')

5
js/layout-mode.js

@ -3,9 +3,8 @@
*/ */
( function( window, factory ) { ( function( window, factory ) {
'use strict';
// universal module definition // universal module definition
/* jshint strict: false */ /*globals define, module, require */
if ( typeof define == 'function' && define.amd ) { if ( typeof define == 'function' && define.amd ) {
// AMD // AMD
define( [ define( [
@ -13,7 +12,7 @@
'outlayer/outlayer' 'outlayer/outlayer'
], ],
factory ); factory );
} else if ( typeof exports == 'object' ) { } else if ( typeof module == 'object' && module.exports ) {
// CommonJS // CommonJS
module.exports = factory( module.exports = factory(
require('get-size'), require('get-size'),

2
js/layout-modes/fit-rows.js

@ -3,8 +3,8 @@
*/ */
( function( window, factory ) { ( function( window, factory ) {
'use strict';
// universal module definition // universal module definition
/* jshint strict: false */ /*globals define, module, require */
if ( typeof define == 'function' && define.amd ) { if ( typeof define == 'function' && define.amd ) {
// AMD // AMD
define( [ define( [

4
js/layout-modes/masonry.js

@ -5,8 +5,8 @@
*/ */
( function( window, factory ) { ( function( window, factory ) {
'use strict';
// universal module definition // universal module definition
/* jshint strict: false */ /*globals define, module, require */
if ( typeof define == 'function' && define.amd ) { if ( typeof define == 'function' && define.amd ) {
// AMD // AMD
define( [ define( [
@ -14,7 +14,7 @@
'masonry/masonry' 'masonry/masonry'
], ],
factory ); factory );
} else if ( typeof exports == 'object' ) { } else if ( typeof module == 'object' && module.exports ) {
// CommonJS // CommonJS
module.exports = factory( module.exports = factory(
require('../layout-mode'), require('../layout-mode'),

4
js/layout-modes/vertical.js

@ -3,15 +3,15 @@
*/ */
( function( window, factory ) { ( function( window, factory ) {
'use strict';
// universal module definition // universal module definition
/* jshint strict: false */ /*globals define, module, require */
if ( typeof define == 'function' && define.amd ) { if ( typeof define == 'function' && define.amd ) {
// AMD // AMD
define( [ define( [
'../layout-mode' '../layout-mode'
], ],
factory ); factory );
} else if ( typeof exports == 'object' ) { } else if ( typeof module == 'object' && module.exports ) {
// CommonJS // CommonJS
module.exports = factory( module.exports = factory(
require('../layout-mode') require('../layout-mode')

Loading…
Cancel
Save