Skip to content

Commit

Permalink
Merge pull request #513 from bem/issue-502__runtime-path-in-7.x
Browse files Browse the repository at this point in the history
Compiler: runtime lint path fixed
  • Loading branch information
miripiruni committed Mar 26, 2018
2 parents 220e7ee + 79ffef5 commit dd1545a
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 dd1545a

Please sign in to comment.