cn.dreampie.coffeescript.compiler
类 CoffeeCompiler

java.lang.Object
  继承者 cn.dreampie.coffeescript.compiler.CoffeeCompiler

public class CoffeeCompiler
extends Object


构造方法摘要
CoffeeCompiler()
           
CoffeeCompiler(List<Option> options)
           
 
方法摘要
 String compile(CoffeeSource input)
           
 void compile(CoffeeSource input, File output)
          Compiles the input CoffeeSource to CSS and writes it to the specified output File.
 void compile(CoffeeSource input, File output, boolean force)
          Compiles the input CoffeeSource to CSS and writes it to the specified output File.
 String compile(File input)
          Compiles the COFFEE input File to CSS.
 void compile(File input, File output)
          Compiles the COFFEE input File to CSS and writes it to the specified output File.
 void compile(File input, File output, boolean force)
          Compiles the COFFEE input File to CSS and writes it to the specified output File.
 void compile(File input, File output, String name)
           
 String compile(File input, String name)
           
 String compile(String coffeeScriptSource)
           
 String compile(String coffeeScriptSource, String name)
           
 URL getCoffeeJs()
          Returns the COFFEE JavaScript file used by the compiler.
 String getEncoding()
          Returns the character encoding used by the compiler when writing the output File.
 List<Option> getOptionArgs()
           
 boolean isCompress()
          Returns whether the compiler will compress the CSS.
 void setCoffeeJs(URL coffeeJs)
          Sets the COFFEE JavaScript file used by the compiler.
 void setCompress(boolean compress)
          Sets the compiler to compress the CSS.
 void setEncoding(String encoding)
          Sets the character encoding used by the compiler when writing the output File.
 void setOptionArgs(String... args)
           
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

CoffeeCompiler

public CoffeeCompiler()

CoffeeCompiler

public CoffeeCompiler(List<Option> options)
方法详细信息

getCoffeeJs

public URL getCoffeeJs()
Returns the COFFEE JavaScript file used by the compiler. COMPILE_STRING

返回:
The COFFEE JavaScript file used by the compiler.

setCoffeeJs

public void setCoffeeJs(URL coffeeJs)
Sets the COFFEE JavaScript file used by the compiler. Must be set before compile(java.io.File) } is called.

参数:
coffeeJs - COFFEE JavaScript file used by the compiler.

isCompress

public boolean isCompress()
Returns whether the compiler will compress the CSS.

返回:
Whether the compiler will compress the CSS.

setCompress

public void setCompress(boolean compress)
Sets the compiler to compress the CSS. Must be set before init() is called.

参数:
compress - If true, sets the compiler to compress the CSS.

getEncoding

public String getEncoding()
Returns the character encoding used by the compiler when writing the output File.

返回:
The character encoding used by the compiler when writing the output File.

setEncoding

public void setEncoding(String encoding)
Sets the character encoding used by the compiler when writing the output File. If not set the platform default will be used. Must be set before compile(java.io.File) ()} is called.

参数:
encoding - character encoding used by the compiler when writing the output File.

compile

public String compile(String coffeeScriptSource)
               throws CoffeeException,
                      IOException
抛出:
CoffeeException
IOException

compile

public String compile(String coffeeScriptSource,
                      String name)
               throws CoffeeException,
                      IOException
抛出:
CoffeeException
IOException

compile

public String compile(File input)
               throws IOException,
                      CoffeeException
Compiles the COFFEE input File to CSS.

参数:
input - The COFFEE input File to compile.
返回:
The CSS.
抛出:
IOException - If the COFFEE file cannot be read.
CoffeeException

compile

public void compile(File input,
                    File output)
             throws IOException,
                    CoffeeException
Compiles the COFFEE input File to CSS and writes it to the specified output File.

参数:
input - The COFFEE input File to compile.
output - The output File to write the CSS to.
抛出:
IOException - If the COFFEE file cannot be read or the output file cannot be written.
CoffeeException

compile

public void compile(File input,
                    File output,
                    boolean force)
             throws IOException,
                    CoffeeException
Compiles the COFFEE input File to CSS and writes it to the specified output File.

参数:
input - The COFFEE input File to compile.
output - The output File to write the CSS to.
force - 'false' to only compile the COFFEE input file in case the COFFEE source has been modified (including imports) or the output file does not exists.
抛出:
IOException - If the COFFEE file cannot be read or the output file cannot be written.
CoffeeException

compile

public String compile(CoffeeSource input)
               throws CoffeeException,
                      IOException
抛出:
CoffeeException
IOException

compile

public void compile(CoffeeSource input,
                    File output)
             throws IOException,
                    CoffeeException
Compiles the input CoffeeSource to CSS and writes it to the specified output File.

参数:
input - The input CoffeeSource to compile.
output - The output File to write the CSS to.
抛出:
IOException - If the COFFEE file cannot be read or the output file cannot be written.
CoffeeException

compile

public void compile(CoffeeSource input,
                    File output,
                    boolean force)
             throws IOException,
                    CoffeeException
Compiles the input CoffeeSource to CSS and writes it to the specified output File.

参数:
input - The input CoffeeSource to compile.
output - The output File to write the CSS to.
force - 'false' to only compile the input CoffeeSource in case the COFFEE source has been modified (including imports) or the output file does not exists.
抛出:
IOException - If the COFFEE file cannot be read or the output file cannot be written.
CoffeeException

compile

public String compile(File input,
                      String name)
               throws IOException,
                      CoffeeException
抛出:
IOException
CoffeeException

compile

public void compile(File input,
                    File output,
                    String name)
             throws IOException,
                    CoffeeException
抛出:
IOException
CoffeeException

getOptionArgs

public List<Option> getOptionArgs()

setOptionArgs

public void setOptionArgs(String... args)


Copyright © 2014. All rights reserved.