add UMD support. fix #787
This commit is contained in:
parent
9da952fea3
commit
613a05f154
@ -70,7 +70,9 @@ module.exports = function(grunt) {
|
|||||||
head: false,
|
head: false,
|
||||||
module: false,
|
module: false,
|
||||||
console: false,
|
console: false,
|
||||||
unescape: false
|
unescape: false,
|
||||||
|
define: false,
|
||||||
|
exports: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
files: [ 'Gruntfile.js', 'js/reveal.js' ]
|
files: [ 'Gruntfile.js', 'js/reveal.js' ]
|
||||||
|
26
js/reveal.js
26
js/reveal.js
@ -5,10 +5,28 @@
|
|||||||
*
|
*
|
||||||
* Copyright (C) 2014 Hakim El Hattab, http://hakim.se
|
* Copyright (C) 2014 Hakim El Hattab, http://hakim.se
|
||||||
*/
|
*/
|
||||||
var Reveal = (function(){
|
(function (root, factory) {
|
||||||
|
if (typeof define === 'function' && define.amd) {
|
||||||
|
// AMD. Register as an anonymous module.
|
||||||
|
define(function () {
|
||||||
|
root.Reveal = factory();
|
||||||
|
return root.Reveal;
|
||||||
|
});
|
||||||
|
} else if (typeof exports === 'object') {
|
||||||
|
// Node. Does not work with strict CommonJS, but
|
||||||
|
// only CommonJS-like enviroments that support module.exports,
|
||||||
|
// like Node.
|
||||||
|
module.exports = factory();
|
||||||
|
} else {
|
||||||
|
// Browser globals
|
||||||
|
root.Reveal = factory();
|
||||||
|
}
|
||||||
|
}(this, function(){
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
var Reveal;
|
||||||
|
|
||||||
var SLIDES_SELECTOR = '.reveal .slides section',
|
var SLIDES_SELECTOR = '.reveal .slides section',
|
||||||
HORIZONTAL_SLIDES_SELECTOR = '.reveal .slides>section',
|
HORIZONTAL_SLIDES_SELECTOR = '.reveal .slides>section',
|
||||||
VERTICAL_SLIDES_SELECTOR = '.reveal .slides>section.present>section',
|
VERTICAL_SLIDES_SELECTOR = '.reveal .slides>section.present>section',
|
||||||
@ -3232,7 +3250,7 @@ var Reveal = (function(){
|
|||||||
// --------------------------------------------------------------------//
|
// --------------------------------------------------------------------//
|
||||||
|
|
||||||
|
|
||||||
return {
|
Reveal = {
|
||||||
initialize: initialize,
|
initialize: initialize,
|
||||||
configure: configure,
|
configure: configure,
|
||||||
sync: sync,
|
sync: sync,
|
||||||
@ -3379,4 +3397,6 @@ var Reveal = (function(){
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
})();
|
return Reveal;
|
||||||
|
|
||||||
|
}));
|
||||||
|
Loading…
Reference in New Issue
Block a user