# -*- python -*-

load("@drake//tools/install:install.bzl", "install", "install_files")

licenses(["notice"])  # MIT

# TODO(jwnimmer-tri) The main.min.js embeds Three.js and possible other third-
# party dependencies as well.  We probably need to install the transitive
# licenses for those dependencies, since we are a derivative work.

VIEWER_FILES = [
    "dist/index.html",
    "dist/main.min.js",
]

exports_files(
    VIEWER_FILES,
    visibility = ["//visibility:public"],
)

# This installation is for meshcat-python.
install_files(
    name = "install_viewer",
    dest = "@PYTHON_SITE_PACKAGES@/meshcat/viewer",
    files = VIEWER_FILES,
)

install(
    name = "install",
    docs = ["LICENSE"],
    visibility = ["//visibility:public"],
    deps = [":install_viewer"],
)
