getCreateResult: function(path, suffix, vars) { var data = vars.data, i18n = data && !BEM.util.isEmptyObject(data)? this.serializeI18nData(data, vars.lang) .concat([this.serializeI18nInit(vars.lang)]) .join('\n') : ''; return this.getHtml( this.getBemhtml(vars.Prefix, i18n), this.getBemjson(vars.Prefix)); },
.then(function(res) { res = data && !BEM.util.isEmptyObject(data)? res .concat(_this.serializeI18nData(data, lang)) .concat([_this.serializeI18nInit(lang)]) : res; return opts.declaration .then(function(decl) { decl = decl.depsByTechs; if (!decl || !decl.js || !decl.js.bemhtml) return res; decl = { deps: decl.js.bemhtml }; var bemhtmlTech = context.createTech('bemhtml'), output = PATH.resolve( opts.outputDir, opts.outputName ), prefixes = bemhtmlTech.getBuildPrefixes( bemhtmlTech.transformBuildDecl(decl), context.getLevels() ), bemhtmlResults = bemhtmlTech.getBuildResults( prefixes, PATH.dirname(output) + PATH.dirSep, PATH.basename(output) ); return bemhtmlResults .then(function(r) { res.unshift(r['bemhtml.js']); return res; }); }); });