Skip to content

Commit

Permalink
Compiler: runtime lint path fixed (issue #502)
Browse files Browse the repository at this point in the history
  • Loading branch information
miripiruni committed Mar 26, 2018
1 parent 680b9a5 commit 33106ae
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/compiler.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
var vm = require('vm');
var path = require('path');
var BEMXJSTError = require('./bemxjst/error').BEMXJSTError;

function Compiler(runtime) {
Expand Down Expand Up @@ -42,7 +43,9 @@ Compiler.prototype.generate = function generate(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 = [
'/// -------------------------------------',
Expand Down

0 comments on commit 33106ae

Please sign in to comment.