diff --git a/lib/bemhtml/compiler.js b/lib/bemhtml/compiler.js index 573adb3d..e495ee79 100644 --- a/lib/bemhtml/compiler.js +++ b/lib/bemhtml/compiler.js @@ -376,7 +376,6 @@ Compiler.prototype.compile = function compile(code) { var out = this.generate(code), exports = {}; - require('fs').writeFileSync('/tmp/1.js', out); vm.runInNewContext(out, { exports: exports, console: console }); return exports; diff --git a/package.json b/package.json index 86b6778f..b45d6d45 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "esprima": "~1.0.2", "ometajs": "~3.2.2", "uglify-js": "~2.3.2", - "xjst": "~0.6.1" + "xjst": "~0.7.0" }, "devDependencies": { "mocha": "~1.9.0", diff --git a/test/fixtures/i-bem.js b/test/fixtures/i-bem.js index 689211aa..7487b81c 100644 --- a/test/fixtures/i-bem.js +++ b/test/fixtures/i-bem.js @@ -1,6 +1,6 @@ module.exports = function() { -if (this.$override) (function() { +oninit(function(exports) { var BEM_ = {}, toString = Object.prototype.toString, @@ -256,13 +256,13 @@ BEMContext.prototype.generateId = function generateId() { var oldApply = exports.apply; // Wrap xjst's apply and export our own -this.$exports.apply = BEMContext.apply = function _apply() { +exports.apply = BEMContext.apply = function _apply() { var ctx = new BEMContext(this, oldApply); ctx.apply(); return ctx._buf.join(''); }; -}).call(this); // this.$override +}); // oninit match(this._mode === '')( match()(function() {