const svgtofont = require("svgtofont");
const path = require("path");

const SVG_PATH = 'dist/default/icons/svg';
const FONTS_PATH = 'dist/default/icons/fonts';

svgtofont({
  src: path.resolve(SVG_PATH), // svg path
  dist: path.resolve(FONTS_PATH), // output path
  fontName: "ez-icons", // font name
  classNamePrefix: "ez-icon",
  css: true, // Create CSS files.
  startUnicode: 0xea01, // unicode start number
  emptyDist: true, //Clear output directory contents
  svgicons2svgfont: {
    fontHeight: 1000,
    normalize: true,
  },
  // website = null, no demo html files
  website: {
    title: "ez-icon",
    // Must be a .svg format image.
    //logo: path.resolve(process.cwd(), "svg", "git.svg"),
    version: 1,
    logo: "Sankhya Tecnologia",
    meta: {
      description: "Biblioteca de icones de design system da Sankhya Tecnologia.",
      keywords: "svgtofont,TTF,EOT,WOFF,WOFF2,SVG"
    },
    description: ``,
    // Add a Github corner to your website
    // Like: https://github.com/uiwjs/react-github-corners
    corners: {
      url: 'https://gitlab.sankhya.com.br/dti/design-system/ez-design',
      width: 62, // default: 60
      height: 62, // default: 60
      bgColor: '#dc3545' // default: '#151513'
    },
    links: [
      {
        title: "GitLab",
        url: "https://gitlab.sankhya.com.br/dti/design-system/ez-design"
      },
      {
        title: "Feedback",
        url: "https://gitlab.sankhya.com.br/dti/design-system/ez-design/-/issues"
      },
      {
        title: "Font Class",
        url: "index.html"
      },
      {
        title: "Unicode",
        url: "unicode.html"
      }
    ],
    footerInfo: `<a href="https://github.com/jaywcjlove/svgtofont"></a>`
  }
}).then(() => {
  console.log('done!');
});;