Sha256: 8eb1fe2908cc097e92f6918f6a17b920036f3aaa5b8f08139c517a94cc56df2d

Contents?: true

Size: 1.42 KB

Versions: 8

Compression:

Stored size: 1.42 KB

Contents

import importGlob from "../lib/scripts/esbuild-plugin-import-glob.mjs";
import buildIcons from "../lib/scripts/esbuild-plugin-build-icons.mjs";
import mapAliasedPath from "../lib/scripts/map-aliased-path.mjs";
import cleanPlugin from "../lib/scripts/esbuild-plugin-clean.mjs";
import { copy } from "esbuild-plugin-copy";
import { cocoPath } from "./utils.js";

const watch = process.argv.includes("--watch");
const dev = watch || process.argv.includes("--dev");

export default {
  entryPoints: ["coco.js"],
  bundle: true,
  metafile: true,
  outdir: cocoPath("@build"),
  absWorkingDir: cocoPath("@js"),
  entryNames: `[dir]${dev ? "/dev" : ""}/[name]`,
  logLevel: dev ? "warning" : "error",
  plugins: [
    importGlob({
      importMapper: mapAliasedPath,
    }),
    cleanPlugin({
      initialCleanPatterns: [
        "**/*",
        "!coco.css",
        "!coco.js",
        "!tailwind.preset.js",
      ],
    }),
    buildIcons(
      cocoPath("@npm/lucide-static/icons"),
      cocoPath("@build/icons"),
      cocoPath("@config")
    ),
    copy({
      assets: [
        {
          from: ["./app/assets/img/**/*"],
          to: ["./img"],
        },
        {
          from: ["./app/assets/custom_icons/lucide/**/*"],
          to: ["./icons"],
        },
        {
          from: ["./app/assets/custom_icons/other/**/*"],
          to: ["./icons/custom"],
        },
      ],
      watch,
    }),
  ],
  format: "esm",
  platform: "node",
};

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
coveragebook_components-0.19.8 config/esbuild.config.mjs
coveragebook_components-0.19.7 config/esbuild.config.mjs
coveragebook_components-0.19.6 config/esbuild.config.mjs
coveragebook_components-0.19.5 config/esbuild.config.mjs
coveragebook_components-0.19.4 config/esbuild.config.mjs
coveragebook_components-0.19.3 config/esbuild.config.mjs
coveragebook_components-0.19.2 config/esbuild.config.mjs
coveragebook_components-0.19.1 config/esbuild.config.mjs