mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
This reduces chances of errors where consumers of strings mutate inputs and reduces memory usage of the app. Test suite passes now, but there may be some stuff left, so we will run a few sites on a branch prior to merging
27 lines
477 B
Ruby
27 lines
477 B
Ruby
# frozen_string_literal: true
|
|
|
|
require 'es6_module_transpiler/rails/version'
|
|
require 'es6_module_transpiler/tilt'
|
|
require 'es6_module_transpiler/sprockets'
|
|
|
|
module ES6ModuleTranspiler
|
|
def self.compile_to
|
|
@compile_to || :amd
|
|
end
|
|
|
|
def self.compile_to=(target)
|
|
@compile_to = target
|
|
end
|
|
|
|
def self.transform=(transform)
|
|
@transform = transform
|
|
end
|
|
|
|
def self.transform
|
|
@transform
|
|
end
|
|
|
|
def self.compiler_options
|
|
@compiler_options ||= {}
|
|
end
|
|
end
|