modules/jooby-assets/src/main/java/org/jooby/assets/AssetCompiler.java
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);

    return new File(dir, filename);
  }
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);

    return new File(dir, filename);
  }
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.