Skip to content

Commit dd1545a

Browse files
authored
Merge pull request #513 from bem/issue-502__runtime-path-in-7.x
Compiler: runtime lint path fixed
2 parents 220e7ee + 79ffef5 commit dd1545a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/compiler.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
var vm = require('vm');
2+
var path = require('path');
23
var BEMXJSTError = require('./bemxjst').BEMXJSTError;
34
var fnToString = function(code) {
45
// It is fine to compile without templates at first
@@ -46,7 +47,9 @@ Compiler.prototype.generate = function(code, options) {
4647

4748
if (options.runtimeLint)
4849
code = code + ';' + require('fs')
49-
.readFileSync('./runtime-lint/index.js', 'utf8');
50+
.readFileSync(
51+
path.resolve(__dirname, '../runtime-lint/index.js'),
52+
'utf8');
5053

5154
var source = [
5255
'/// -------------------------------------',

0 commit comments

Comments
 (0)