root = @ if typeof(exports) isnt "undefined" CodeSync = exports else CodeSync = root.CodeSync = {} CodeSync.VERSION = "<%= CodeSync::Version %>" CodeSync.backends = {} CodeSync.util = {} CodeSync.plugins = {} CodeSync._config ||= defaultFileType: "coffeescript" assetCompilationEndpoint: "http://localhost:9295/source" serverInfoEndpoint: "http://localhost:9295/info" sprocketsEndpoint: "http://localhost:9295/assets" socketEndpoint: "http://localhost:9295/faye" editorToggleHotkey: "ctrl+j" debugMode: false CodeSync.set = (setting, value)-> CodeSync._config[setting] = value CodeSync.get = (setting)-> CodeSync._config[setting] CodeSync.enableLogging = ()-> CodeSync.set("debugMode", true) CodeSync.log = (args...)-> if CodeSync.get("debugMode") isnt false args.unshift "CodeSync Log:" console.log args... _originalSetOption = CodeMirror::setOption