diff --git a/lib/compiler.js b/lib/compiler.js index 4eac3af2..8d0d40f9 100644 --- a/lib/compiler.js +++ b/lib/compiler.js @@ -1,4 +1,5 @@ var vm = require('vm'); +var path = require('path'); var BEMXJSTError = require('./bemxjst').BEMXJSTError; var fnToString = function(code) { // It is fine to compile without templates at first @@ -46,7 +47,9 @@ Compiler.prototype.generate = function(code, options) { if (options.runtimeLint) code = code + ';' + require('fs') - .readFileSync('./runtime-lint/index.js', 'utf8'); + .readFileSync( + path.resolve(__dirname, '../runtime-lint/index.js'), + 'utf8'); var source = [ '/// -------------------------------------',