modules/jooby-assets/src/main/java/org/jooby/assets/AssetCompiler.java
/**
   * Apply the processor pipeline to the given asset. Like {@link #build(String, File)} but for a
   * single file or asset.
   *
   * @param filename Asset to build.
   * @return Processed asset.
   * @throws Exception If something goes wrong.
   */
Apply the processor pipeline to the given asset. Like  #build(String, File) but for a
single file or asset.

@param filename Asset to build.
@return Processed asset.
@throws Exception If something goes wrong.
Apply the processor pipeline to the given asset . Like #build ( String File ) but for a single file or asset . @param filename Asset to build . @return Processed asset . @throws Exception If something goes wrong .
public File buildOne(String filename, File dir) throws Exception {
    String dist = "dev";
    final MediaType type;
    AssetWriter writer;
    if (scripts.test(filename)) {
      type = MediaType.js;
      writer = new AssetWriter(dist, null, dir, ".js", ";", charset, this.fileset, scripts);
    } else if (styles.test(filename)) {
      type = MediaType.css;
      writer = new AssetWriter(dist, null, dir, ".css", "", charset, this.fileset, styles);
    } else {
      return null;
    }
    List<AssetProcessor> pipeline = pipeline(dist);
    compile(pipeline, ImmutableList.of(filename).iterator(), type, writer, path -> true, 0, 0);
    File output = new File(dir, filename);
    return output;
  }
public File buildOne ( String filename , File dir ) throws Exception { String dist = "dev" ; final MediaType type ; AssetWriter writer ; if ( scripts . test ( filename ) ) { type = MediaType . js ; writer = new AssetWriter ( dist , null , dir , ".js" , ";" , charset , this . fileset , scripts ) ; } else if ( styles . test ( filename ) ) { type = MediaType . css ; writer = new AssetWriter ( dist , null , dir , ".css" , "" , charset , this . fileset , styles ) ; } else { return null ; } List < AssetProcessor > pipeline = pipeline ( dist ) ; compile ( pipeline , ImmutableList . of ( filename ) . iterator ( ) , type , writer , path -> true , 0 , 0 ) ; File output = new File ( dir , filename ) ; return output ; }
Apply the processor pipeline to the given asset.
Apply the processor pipeline to the given asset .