chromium/third_party/lottie/BUILD.gn

# Copyright 2019 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//third_party/closure_compiler/compile_js.gni")
import("//third_party/node/node.gni")
import("//ui/webui/resources/tools/generate_grd.gni")

assert(!is_android && !is_ios)

js_library("lottie_worker") {
}

node("minify") {
  script = "minify_lottie.py"
  inputs = [ "lottie_worker.js" ]
  outputs = [ "$target_gen_dir/lottie_worker.min.js" ]
  args = [
    "--out_folder",
    rebase_path(target_gen_dir, root_build_dir),
  ]
}

generate_grd("build_grdp") {
  grd_prefix = "lottie"
  out_grd = "$target_gen_dir/resources.grdp"
  public_deps = [ ":minify" ]
  input_files_base_dir = rebase_path(target_gen_dir, root_build_dir)
  input_files = [ "lottie_worker.min.js" ]
  resource_path_prefix = "lottie"
}