Sha256: 9053687e3020e8db9d03f118f2da8b176442f4ca4d3461c523ff8e15d923d148

Contents?: true

Size: 372 Bytes

Versions: 8

Compression:

Stored size: 372 Bytes

Contents

module Linner
  class Wrapper
    WRAPPER =
      'window.require.define({"%s":' +
        'function(exports, require, module){' +
        '%s' +
        ";}});\n"

    def self.wrap(name, content)
      WRAPPER % [name, content]
    end

    def self.definition
      File.read(File.join File.dirname(__FILE__), "../../vendor", "require_definition.js")
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
linner-0.4.4 lib/linner/wrapper.rb
linner-0.4.3 lib/linner/wrapper.rb
linner-0.4.2 lib/linner/wrapper.rb
linner-0.4.1 lib/linner/wrapper.rb
linner-0.4.0 lib/linner/wrapper.rb
linner-0.3.2 lib/linner/wrapper.rb
linner-0.3.1 lib/linner/wrapper.rb
linner-0.3.0 lib/linner/wrapper.rb