text: // deno-lint-ignore-file
  // TODO execute using Deno
  // noinspection NpmUsedModulesInstalled
  const favicons = require("favicons");
  const fs = require("fs");
  const path = require("path");
  
  process.chdir(path.dirname(fs.realpathSync(__filename)));
  
  const source = "../assets/favicon.svg"; // Source image(s). `string`, `buffer` or array of `string`
  const configuration = {
      path: "/assets/favicons", // Path for overriding default icons path. `string`
      appName: "Prandium", // Your application's name. `string`
      appShortName: "Prandium", // Your application's short_name. `string`. Optional. If not set, appName will be used
      appDescription: null, // Your application's description. `string`
      developerName: null, // Your (or your developer's) name. `string`
      developerURL: null, // Your (or your developer's) URL. `string`
      dir: "auto", // Primary text direction for name, short_name, and description
      lang: "en-US", // Primary language for name and short_name
      background: "transparent", // Background colour for flattened icons. `string`
      theme_color: "#0dcaf0", // Theme color user for example in Android's task switcher. `string`
      appleStatusBarStyle: "black-translucent", // Style for Apple status bar: "black-translucent", "default", "black". `string`
      display: "standalone", // Preferred display mode: "fullscreen", "standalone", "minimal-ui" or "browser". `string`
      orientation: "natural", // Default orientation: "any", "natural", "portrait" or "landscape". `string`
      scope: "/", // set of URLs that the browser considers within your app
      start_url: "/?homescreen=1", // Start URL when launching the application from a device. `string`
      version: "1.0", // Your application's version string. `string`
      logging: false, // Print logs to console? `boolean`
      pixel_art: false, // Keeps pixels "sharp" when scaling up, for pixel art.  Only supported in offline mode.
      loadManifestWithCredentials: true, // Browsers don't send cookies when fetching a manifest, enable this to fix that. `boolean`
      icons: {
        // Platform Options:
        // - offset - offset in percentage
        // - background:
        //   * false - use default
        //   * true - force use default, e.g. set background for Android icons
        //   * color - set background for the specified icons
        //   * mask - apply mask in order to create circle icon (applied by default for firefox). `boolean`
        //   * overlayGlow - apply glow effect after mask has been applied (applied by default for firefox). `boolean`
        //   * overlayShadow - apply drop shadow after mask has been applied .`boolean`
        //
        android: true, // Create Android homescreen icon. `boolean` or `{ offset, background, mask, overlayGlow, overlayShadow }` or an array of sources
        appleIcon: true, // Create Apple touch icons. `boolean` or `{ offset, background, mask, overlayGlow, overlayShadow }` or an array of sources
        appleStartup: false, // Create Apple startup images. `boolean` or `{ offset, background, mask, overlayGlow, overlayShadow }` or an array of sources
        coast: false, // Create Opera Coast icon. `boolean` or `{ offset, background, mask, overlayGlow, overlayShadow }` or an array of sources
        favicons: true, // Create regular favicons. `boolean` or `{ offset, background, mask, overlayGlow, overlayShadow }` or an array of sources
        firefox: false, // Create Firefox OS icons. `boolean` or `{ offset, background, mask, overlayGlow, overlayShadow }` or an array of sources
        windows: false, // Create Windows 8 tile icons. `boolean` or `{ offset, background, mask, overlayGlow, overlayShadow }` or an array of sources
        yandex: false, // Create Yandex browser icon. `boolean` or `{ offset, background, mask, overlayGlow, overlayShadow }` or an array of sources
      },
    },
    callback = function (error, response) {
      if (error) {
        console.log(error.message); // Error description e.g. "An unknown error has occurred"
        return;
      }
      [...response.images, ...response.files].forEach(({ name, contents }) => {
        fs.writeFileSync(path.join("..", "assets", "favicons", name), contents);
      });
      fs.writeFileSync(
        path.join(
          "..",
          "src",
          "tpl",
          "templates",
          "_structure",
          "favicons.ts",
        ),
        `import { html } from "../../mod.ts";
  
  export const Favicons = () =>
    html\`
  ${response.html.map((line) => `    ${line}`).join("\n")}
      \`;`,
      );
    };
  
  favicons(source, configuration, callback);
  