Skip to content

Commit

Permalink
Merge branch 'xaka-master'
Browse files Browse the repository at this point in the history
  • Loading branch information
FotoVerite committed Aug 13, 2014
2 parents e092989 + c7e0534 commit 644ea8d
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions BUILD/BUILD.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,20 @@ code += 'var definitions = faker.definitions;\n';
code += 'var Helpers = faker.Helpers;\n';

// if we are running in a CommonJS env, export everything out
code +=["\nif (typeof define == 'function'){",
" define(function(){",
" return faker;",
" });",
code += ["\n",
"if (typeof exports === 'object') {",
" // CommonJS",
" module.exports = faker;",
"}",
"else if(typeof module !== 'undefined' && module.exports) {",
" module.exports = faker;",
"else if (typeof define === 'function' && define.amd) {",
" // AMD",
" define(function () {",
" return faker;",
" });",
"}",
"else {",
" window.faker = faker;",
" // Global Variables",
" window.faker = faker;",
"}",
"",
"}()); // end faker closure"].join('\n');
Expand Down

0 comments on commit 644ea8d

Please sign in to comment.