Skip to content

Commit

Permalink
#66 Make code better by @blond advices
Browse files Browse the repository at this point in the history
  • Loading branch information
tormozz48 committed Aug 17, 2015
1 parent 109a011 commit 1fe4fb9
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions techs/i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,9 @@ module.exports = require('enb/lib/build-flow').create()
commonJS = opts.exports.commonJS || '',
ym = opts.exports.ym || '',
globals = opts.exports.globals || '',
isForcedGlobalExports = opts.exports.globals === 'force';
defineAsGlobal = ' defineAsGlobal = false;';

opts.exports.globals === 'force' && (defineAsGlobal = '');
return [
'(function (global) {',
' var __i18n__ = ' + compile(parsed.core, parsed.keysets, opts) + ',',
Expand All @@ -83,8 +84,7 @@ module.exports = require('enb/lib/build-flow').create()
' // CommonJS',
' if (typeof exports === "object") {',
' module.exports = __i18n__;',
isForcedGlobalExports === 'force' ? '' :
' defineAsGlobal = false;',
defineAsGlobal,
' }'
].join(EOL),
'',
Expand All @@ -94,8 +94,7 @@ module.exports = require('enb/lib/build-flow').create()
' modules.define("i18n", function (provide) {',
' provide(__i18n__);',
' });',
isForcedGlobalExports === 'force' ? '' :
' defineAsGlobal = false;',
defineAsGlobal,
' }'
].join(EOL),
'',
Expand Down

0 comments on commit 1fe4fb9

Please sign in to comment.