Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
OpalCompiler.prototype.compile = function(require, outputFile, includes) {
var builder = Builder.$new();
builder.$append_paths('node_modules/opal-compiler/src/stdlib', 'lib', 'build/asciidoctor/lib');
builder.compiler_options = Opal.hash({'dynamic_require_severity': this.dynamicRequireLevel});
if (typeof includes !== 'undefined') {
var includesLength = includes.length;
for (var i = 0; i < includesLength; i++) {
builder.$append_paths(includes[i]);
}
}
log.debug('compile ' + require);
var result = builder.$build(require);
fs.writeFileSync(outputFile, result.$to_s(), 'utf8');
}