This commit is contained in:
thednp 2016-10-10 02:34:32 +03:00
parent 0bebda1eff
commit e61bc99ec4
2 changed files with 11 additions and 13 deletions

View file

@ -10,12 +10,11 @@
(function (root,factory) {
if (typeof define === 'function' && define.amd) {
define(["./kute.js"], function(KUTE){ factory(KUTE); return KUTE; });
} else if(typeof module == "object" && typeof require == "function") {
var KUTE = require("./kute.js");
module.exports = factory(KUTE);
define(['kute.js'], factory);
} else if(typeof module == 'object' && typeof require == 'function') {
module.exports = factory(require('kute.js'));
} else if ( typeof root.KUTE !== 'undefined' ) {
factory(KUTE);
factory(root.KUTE);
} else {
throw new Error("Box Shadow Plugin require KUTE.js.");
}
@ -25,7 +24,7 @@
// filter unsupported browsers
if (!('boxShadow' in document.body.style)) {return;}
// add a reference to KUTE object
var g = window, K = g.KUTE, getComputedStyle = K.gCS,
var g = window, K = KUTE, getComputedStyle = K.gCS,
trueColor = K.truC, prepareStart = K.prS, parseProperty = K.pp, DOM = g.dom,
unit = g.Interpolate.unit, color = g.Interpolate.color,

View file

@ -97,12 +97,11 @@
(function (root,factory) {
if (typeof define === 'function' && define.amd) {
define(["./kute.js"], function(KUTE){ factory(KUTE); return KUTE; });
} else if(typeof module == "object" && typeof require == "function") {
var KUTE = require("./kute.js");
module.exports = factory(KUTE);
} else if ( typeof root.KUTE !== 'undefined' ) {
factory(KUTE);
define(['kute.js'], factory);
} else if(typeof module == 'object' && typeof require == 'function') {
module.exports = factory(require('kute.js'));
} else if ( typeof root.KUTE !== 'undefined' ) {
factory(root.KUTE);
} else {
throw new Error("pluginName require KUTE.js.");
}
@ -175,7 +174,7 @@ K.Tween.prototype.onUpdate = function(){
</ul>
<p>So let's add support for <kbd class="bg-olive">boxShadow</kbd>! It should be a medium difficulty guide most developers can follow and the purpose of this guide is to showcase how easy it actually is to extend KUTE.js. So grab the above template and let's break it down to pieces:</p>
<pre><code class="language-javascript">// add a reference to global and KUTE object
var g = window, K = g.KUTE,
var g = window, K = KUTE,
// add a reference to KUTE utilities
prepareStart = K.prS, DOM = g.dom, parseProperty = K.pp, trueColor = K.truC,
color = g.Interpolate.color, unit = g.Interpolate.unit, getComputedStyle = K.gCS;