Sha256: a78d6dbe8bfed0983a36ce18685c273572b57e50c1b279b34178579ae8a6246f
Contents?: true
Size: 610 Bytes
Versions: 2
Compression:
Stored size: 610 Bytes
Contents
$jsl_import_regex= /\/\*jsl:import\s+([^\*]*)\*\// $include_regex= /NIB\.asset\(['"]([^)]+)['"]\)/ class JavascriptFile < SourceFile def self.extension ".js" end def can_embed_as_content(file) [".css", ".html", ".json"].include?(file.extension) end def escape_embeded_content(content) content.gsub("\\", "\\\\").gsub("\n", "\\n").gsub("\"", "\\\"").gsub("'", "\\\\'") end def debug_content(options) destination= File.expand_path(options.remove_prefix||"") path= @file_path ? @file_path : self.relative_to_folder(destination) "loadScript(\"#{path}\");\n" end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
distil-0.8.2 | lib/file-types/javascript-file.rb |
distil-0.8.1 | lib/file-types/javascript-file.rb |