Created
February 14, 2015 12:41
-
-
Save matesnippets/734c28f8ce5c5d466250 to your computer and use it in GitHub Desktop.
Here's an example how to define prefixes for YepNope.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Get paths to the js files to use in yepnope | |
* window.thePath is defined in footer | |
*/ | |
(function(yepnope) { | |
// Domain name | |
// var domain = window.location.host, | |
// origin = window.location.origin; | |
yepnope.addPrefix('pathBower', function(resourceObj) { | |
resourceObj.url = window.thePath + "/lib/" + resourceObj.url; | |
return resourceObj; | |
}); | |
yepnope.addPrefix('pathScripts', function(resourceObj) { | |
resourceObj.url = window.thePath + "src/js/" + resourceObj.url; | |
return resourceObj; | |
}); | |
yepnope.addPrefix('pathStyles', function(resourceObj) { | |
resourceObj.url = window.thePath + "/css/" + resourceObj.url; | |
return resourceObj; | |
}); | |
})(this.yepnope); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment