Simple favicon generator.
npm install simple-favicon-generator
!simple-favicon-generator logo
Simple favicon generator.
``sh`
npm install simple-favicon-generatoror
yarn add simple-favicon-generator
If you are using M1 mac, you may fail to install sharp, a library on which it depends.
This is not a fundamental solution, but you can use v14 of Node.js to make the installation succeed.
This is the simplest sample code.
Create a public directory and then run it.
`javascript
const generateFavicons = require('simple-favicon-generator');
(async () => {
const targetImage = './your-site-image.png';
const siteName = 'Your site name';
await generateFavicons(targetImage, siteName);
})();
`
If you want to specify the output directory, specify the third argument.
`javascript
const generateFavicons = require('simple-favicon-generator');
(async () => {
const targetImage = './your-site-image.png';
const siteName = 'Your site name';
await generateFavicons(targetImage, siteName, 'output-dir');
})();
`
`shtest
npm run test