Skip to content

Commit

Permalink
Should not build i18n if langs: true.
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewblond committed Sep 17, 2015
1 parent 2ee6bfd commit 8a1a782
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 20 deletions.
17 changes: 2 additions & 15 deletions lib/node-configurator.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,6 @@ exports.configure = function (config, options) {
]);

if (langs) {
nodeConfig.addTechs([
[keysets, { lang: 'pure' }],
[i18n, { lang: 'pure', exports: { globals: 'force' } }]
]);
nodeConfig.addTarget('?.lang.pure.js');

engines.forEach(function (engine) {
nodeConfig.addTech([engine.tech, engine.options]);
nodeConfig.addTarget(engine.target);
Expand Down Expand Up @@ -116,18 +110,11 @@ exports.configure = function (config, options) {
});
} else {
engines.forEach(function (engine) {
var target = engine.target.replace('.js', '.lang.js'),
preTarget = engine.target.replace('.js', '.pre.lang.js');
var target = engine.target.replace('.js', '.lang.js');

nodeConfig.addTech([mockI18N, {
source: engine.target,
target: preTarget
}]);

nodeConfig.addTech([mergeFile, {
sources: ['?.lang.pure.js', preTarget],
target: target,
sourcemap: true
target: target
}]);

if (_.contains(coverageEngines, engine.name)) {
Expand Down
5 changes: 0 additions & 5 deletions lib/techs/mock-lang-js.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@ module.exports = require('enb/lib/build-flow').create()
file = new File(this._target, withSourceMaps),
mock = [
';(function(global, bem_) {',
' // i18n from bem-core does not need to change because',
' // not initialized keys work as they should',
' if(typeof bem_.I18N === "function" && !bem_.I18N.keyset) {',
' return;',
' }',
' global.BEM = bem_;',
' var i18n = bem_.I18N = function(keyset, key, param) {',
' var result = key;',
Expand Down

0 comments on commit 8a1a782

Please sign in to comment.