blob: 01e5a1cefe16186e85fb079042c5a81689482058 [file] [log] [blame]
load("//bazel:skia_app_container.bzl", "skia_app_container")
load("//infra-sk:copy_file_from_npm_pkg.bzl", "copy_file_from_npm_pkg")
filegroup(
name = "configs",
srcs = glob(
["configs/*.json5"],
allow_empty = False,
),
visibility = ["//skottie:__subpackages__"],
)
# Under rules_js (https://github.com/aspect-build/rules_js), we cannot refer to files inside NPM
# packages directly. Instead, we must create local copies of those files. See the
# copy_file_from_npm_pkg macro documentation for details.
copy_file_from_npm_pkg(
name = "ffmpeg_core_js",
src = "dist/ffmpeg-core.js",
out = "ffmpeg-core.js",
npm_package_name = "@ffmpeg/core",
)
copy_file_from_npm_pkg(
name = "ffmpeg_core_wasm",
src = "dist/ffmpeg-core.wasm",
out = "ffmpeg-core.wasm",
npm_package_name = "@ffmpeg/core",
)
copy_file_from_npm_pkg(
name = "ffmpeg_core_worker_js",
src = "dist/ffmpeg-core.worker.js",
out = "ffmpeg-core.worker.js",
npm_package_name = "@ffmpeg/core",
)
skia_app_container(
name = "skottie_container-base",
base_image = "@base-cipd//image",
dirs = {
"/usr/local/bin": [
[
"//skottie/go/skottie:skottie",
"0755",
],
],
"/usr/local/share/skottie/": [
[
"//skottie/modules/skottie-gif-exporter-sk:gif_js",
"0644",
],
[
"//skottie/modules/skottie-gif-exporter-sk:gif_worker_js",
"0644",
],
[
"//skottie/modules/skottie-inline-sk:bundle",
"0644",
],
[
"ffmpeg-core.js",
"0644",
],
[
"ffmpeg-core.wasm",
"0644",
],
[
"ffmpeg-core.worker.js",
"0644",
],
] + [
[
"//skottie/pages:production/%s.%s" % (page, ext),
"0644",
]
for page in [
"drive",
"embed",
"index",
]
for ext in [
"css",
"html",
"js",
]
],
"/usr/local/share/skottie/configs": [
[
":configs",
"0644",
],
],
},
entrypoint = "/usr/local/bin/skottie",
repository = "skia-public/skottie-base",
)