Skip to content

Commit

Permalink
Compiler: runtime lint path fixed (fix #502)
Browse files Browse the repository at this point in the history
  • Loading branch information
miripiruni committed Mar 26, 2018
1 parent 220e7ee commit 79ffef5
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').BEMXJSTError;
var fnToString = function(code) {
// It is fine to compile without templates at first
Expand Down Expand Up @@ -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 = [
'/// -------------------------------------',
Expand Down

0 comments on commit 79ffef5

Please sign in to comment.