REFACTOR: Migrate markdown functionality in ES6

This commit is contained in:
Robin Ward
2016-06-14 14:31:51 -04:00
parent bc25d9a7a0
commit a546395397
146 changed files with 3259 additions and 5675 deletions

View File

@ -89,6 +89,19 @@ JS
end
end
def module_transpile(source, root_path, logical_path)
klass = self.class
klass.protect do
klass.v8.eval("console.prefix = 'BABEL: babel-eval: ';")
transpiled = babel_source(source)
compiler_source = "new module.exports.Compiler(#{transpiled}, '#{module_name(root_path, logical_path)}', #{compiler_options}).#{compiler_method}()"
@output = klass.v8.eval(compiler_source)
end
end
def evaluate(scope, locals, &block)
return @output if @output