jarch09 / ts-png-to-ico Goto Github PK
View Code? Open in Web Editor NEWConvert PNG to ICO in memory
License: MIT License
Convert PNG to ICO in memory
License: MIT License
I've not checked when this becomes necessary, but what I noticed is that I have to import your library like this:
import pngToIco from 'ts-png-to-ico';
const { generateIco } = pngToIco;
Potentially relevant parts of tsconfig.json:
"target": "es2017",
"lib": ["es2017"],
"module": "node16",
"moduleResolution": "node16",
"esModuleInterop": true,
May be worth mentioning in the documentation.
First off thank you for writing this, was about to write something myself and did a check and found that you had already created this!
I did notice that there's a dependency missing: tslib
In my dev-environment that was not required to specify explicitly, but once deployed it can be, so an easy one to miss. Just thought I'd let you know.
When updating your package I realized I had one more bug to report:
"main": "dist/index.ts",
causes:
throw new ERR_MODULE_NOT_FOUND(
^
CustomError: Cannot find package './node_modules/ts-png-to-ico/' imported from ./src/routes/integration/index.ts
changing it to:
"main": "dist/index.js",
solves it for me, but not sure this is the best solution.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.