com.lonelystorm.air.asset.services.impl.SassCompilerImpl.class Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of air-asset Show documentation
Show all versions of air-asset Show documentation
The LonelyStorm Air Asset library provides support to be able to compile SASS files at runtime.
The newest version!
???? 3x 8com/lonelystorm/air/asset/services/impl/SassCompilerImpl java/lang/Object +com/lonelystorm/air/asset/services/Compiler SassCompilerImpl.java ,Lorg/apache/felix/scr/annotations/Component; *Lorg/apache/felix/scr/annotations/Service; FILE_FORMATS [Ljava/lang/String; fileResolver 1Lcom/lonelystorm/air/asset/services/FileResolver; ,Lorg/apache/felix/scr/annotations/Reference; libraryResolver 4Lcom/lonelystorm/air/asset/services/LibraryResolver; bundle Lorg/osgi/framework/Bundle; container -Lorg/jruby/embed/osgi/OSGiScriptingContainer; receiver Ljava/lang/Object; ()V
this :Lcom/lonelystorm/air/asset/services/impl/SassCompilerImpl; activate 0(Lorg/osgi/service/component/ComponentContext;)V +Lorg/apache/felix/scr/annotations/Activate; +org/osgi/service/component/ComponentContext getBundleContext $()Lorg/osgi/framework/BundleContext; " # ! $ org/osgi/framework/BundleContext & getBundle ()Lorg/osgi/framework/Bundle; ( ) ' * , +org/jruby/embed/osgi/OSGiScriptingContainer . !org/jruby/embed/LocalContextScope 0
CONCURRENT #Lorg/jruby/embed/LocalContextScope; 2 3 1 4 %org/jruby/embed/LocalVariableBehavior 6 TRANSIENT 'Lorg/jruby/embed/LocalVariableBehavior; 8 9 7 : h(Lorg/osgi/framework/Bundle;Lorg/jruby/embed/LocalContextScope;Lorg/jruby/embed/LocalVariableBehavior;)V <
/ = ? getLoadPaths ()Ljava/util/List; A B
/ C gems/sass-3.4.5/lib E java/util/List G add (Ljava/lang/Object;)Z I J H K setLoadPaths (Ljava/util/List;)V M N
/ O $service Q put 8(Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object; S T
/ U scripts/setup.rb W runScriptlet A(Lorg/osgi/framework/Bundle;Ljava/lang/String;)Ljava/lang/Object; Y Z
/ [ ] context -Lorg/osgi/service/component/ComponentContext; paths $Ljava/util/List; Ljava/util/List; compile `(Lcom/lonelystorm/air/asset/models/Asset;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; 6com/lonelystorm/air/asset/exceptions/CompilerException f %org/jruby/embed/InvokeFailedException h d &com/lonelystorm/air/asset/models/Asset k ()[Ljava/lang/String; A m
l n
callMethod K(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/Object; p q
/ r java/lang/String t getCause ()Ljava/lang/Throwable; v w
i x #org/jruby/exceptions/RaiseException z getException ()Lorg/jruby/RubyException; | }
{ ~
getMessage ()Ljava/lang/String; ? ?
i ? sass_backtrace_str ? org/jruby/RubyException ? ;(Ljava/lang/String;)Lorg/jruby/runtime/builtin/IRubyObject; p ?
? ? %org/jruby/runtime/builtin/IRubyObject ? asJavaString ? ? ? ? cause ^(Ljava/lang/String;Ljava/lang/String;)Lcom/lonelystorm/air/asset/exceptions/CompilerException; ? ?
? *(Ljava/lang/String;Ljava/lang/Throwable;)V ?
g ? re %Lorg/jruby/exceptions/RaiseException; ex Lorg/jruby/RubyException; message Ljava/lang/String; backtrace e 'Lorg/jruby/embed/InvokeFailedException; library (Lcom/lonelystorm/air/asset/models/Asset; file source supports =(Lcom/lonelystorm/air/asset/models/Asset;Ljava/lang/String;)Z #org/apache/commons/io/FilenameUtils ? getBaseName &(Ljava/lang/String;)Ljava/lang/String; ? ?
? ? getExtension ? ?
? ? _ ?
startsWith (Ljava/lang/String;)Z ? ?
u ? scss ? equals ? J
u ? sass ? filename extension include 8(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; %s/%s ? / ? #org/apache/commons/lang/StringUtils ? removeStart ? ?
? ? format 9(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String; ? ?
u ? getPathNoEndSeparator ? ?
? ? getName ? ?
? ?
?
? /com/lonelystorm/air/asset/services/FileResolver ? exists ? ? ? ? load ? ? ? ? java/lang/StringBuilder ?
? ? 2com/lonelystorm/air/asset/services/LibraryResolver ? findLibrariesByCategory $(Ljava/lang/String;)Ljava/util/List; ? ? ? ? iterator ()Ljava/util/Iterator; ? ? H ? java/util/Iterator ? hasNext ()Z ? ? ? ? next ()Ljava/lang/Object; ? ? ? ? -com/lonelystorm/air/asset/models/AssetLibrary ?
getSources ()Ljava/util/Set; ? ?
? ?
java/util/Set ? ? ? ? ?
@import '%s'; append -(Ljava/lang/String;)Ljava/lang/StringBuilder;
? length ()I
? toString
?
? sources #Ljava/util/Set; Ljava/util/Set; /Lcom/lonelystorm/air/asset/models/AssetLibrary; directory location files Ljava/lang/StringBuilder; libraries ALjava/util/List;
split 9(Ljava/lang/String;Ljava/lang/String;)[Ljava/lang/String;
? java/util/ArrayList!
" (on|from) line ([0-9]+) of (.+)$ java/util/regex/Pattern& -(Ljava/lang/String;)Ljava/util/regex/Pattern; d(
') trim+ ?
?, matcher 3(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher;./
'0 java/util/regex/Matcher2 matches4 ?
35 group (I)Ljava/lang/String;78
39 java/lang/Integer; parseInt (Ljava/lang/String;)I=>
<? java/lang/StackTraceElementA SassCompilerC :(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;I)V E
BF (Ljava/lang/String;)V H
gI sizeK
HL toArray (([Ljava/lang/Object;)[Ljava/lang/Object;NO HP [Ljava/lang/StackTraceElement;R
setStackTrace !([Ljava/lang/StackTraceElement;)VTU
gV
lineNumber I element Ljava/lang/StackTraceElement; line Ljava/util/regex/Matcher; i lines elements /Ljava/util/List; pattern Ljava/util/regex/Pattern; 8Lcom/lonelystorm/air/asset/exceptions/CompilerException; /%s/_%s.scss/jcr:contentf /%s/%s.scss/jcr:contenth bindFileResolver 4(Lcom/lonelystorm/air/asset/services/FileResolver;)V unbindFileResolver bindLibraryResolver 7(Lcom/lonelystorm/air/asset/services/LibraryResolver;)V unbindLibraryResolver RuntimeInvisibleAnnotations Code LocalVariableTable LineNumberTable LocalVariableTypeTable
StackMapTable
Exceptions
SourceFile !
p p B B q / *? ? r s ) q ? Z*+? % ? + ? -*? /Y*? -? 5? ;? >? @*? @? DM,F? L W*? @,? P*? @R*? VW**? @*? -X? \? ^? r Z Z _ ` , . a c t , . a b s " > ? $ A , B 5 C = E H F Y Gp d e q ^*? @*? ^j? Y-SY,SY+? oS? s? u?:? y? {:? :? ?:?? ?? ? :? gY*? ?? ?? # $ i r \ 0 . ? ? 7 ' ? ? > ? ? L ? ? &