simple-favicon-generator

0.0.2 • Public • Published

simple-favicon-generator

Build Status

simple-favicon-generator logo

Simple favicon generator.

Install

npm install simple-favicon-generator
# or
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.

Usage

This is the simplest sample code.

Create a public directory and then run it.

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.

const generateFavicons = require('simple-favicon-generator');

(async () => {
  const targetImage = './your-site-image.png';
  const siteName = 'Your site name';
  await generateFavicons(targetImage, siteName, 'output-dir');
})();

Development

# test
npm run test

# code format
npm run fmt

Licence

MIT

Author

Yuki Shindo

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.2
    25
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.2
    25
  • 0.0.1
    0

Package Sidebar

Install

npm i simple-favicon-generator

Weekly Downloads

23

Version

0.0.2

License

MIT

Unpacked Size

67.4 kB

Total Files

7

Last publish

Collaborators

  • shinshin86