private String buildScript ( String path , String content ) { StringBuilder script = new StringBuilder ( ) ; script . append ( "require 'rubygems'\n" + "require 'sass/plugin'\n" + "require 'sass/engine'\n" ) ; content = SassRubyUtils . normalizeMultiByteString ( content ) ; script . append ( String . format ( "customImporter = Sass::Importers::JawrImporter.new(@jawrResolver) \n" + "name = \"%s\"\n" + "result = Sass::Engine.new(\"%s\", {:importer => customImporter, :filename => name, :syntax => :scss, :cache => false}).render" , path , content . replace ( "\"" , "\\\"" ) . replace ( "#" , "\\#" ) ) ) ; return script . toString ( ) ; }
Builds the ruby script to execute