Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (function(global, factory) {
- if (typeof define === 'function' && define.amd) {
- define([], factory);
- } else if (typeof module !== 'undefined' && module.exports) {
- module.exports = factory();
- } else {
- global.UriTemplate = factory();
- }
- })(this, function() {
- ...
- // returns constructor function
- });
- require.config({
- paths: {
- 'theLibrary: '../path/to/the/lib'
- }
- });
- var the Lib = new SomeLib(...);
- (function(){
- // the code
- })();
- require.config({
- paths: {
- 'theLibrary: '../path/to/the/lib',
- 'anotherLib: '../path/to/anotherLib'
- },
- shim: {
- 'anotherLib: [
- 'theLibrary'
- ]
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement