Closed userquin closed 3 years ago
Right. I'll move that type to @iconify/types
because it can be used by multiple packages.
do you donwload and test the vite example?
Yes. It works well. As far as I can tell, the only thing needed for it is addition of this type to @iconify/types
:
declare type IconSetInfo = {
info: IconifyInfo;
icons: IconifyJSON;
metadata: IconifyMetaData;
chars: IconifyChars;
};
Is that correct?
I mix this PR with my another branch on the issue #15, sorry.
So, do you want the code on this PR or the code on this branch https://github.com/userquin/collections-json/tree/feat/esm-support-icon-set?
If you want the code on my branch, revert this PR, I'll close it, then I'll make a new PR from the other branch...
Added that type to @iconify/types
as IconifyJSONPackageExports
.
Yes, this stuff belongs to that issue, so can continue there.
And yes, that branch with workspaces looks promising. I think it would be a good idea to use it.
do you want a PR to have it here?
EDIT: I can update the version for @iconify/types
and remove the @iconify/internal-types
package (copying the function on its index.ts
module to json
and icon-set-resolver
packages).
Yes.
For next
branch I'll be changing formatting. Current @antfu/eslint-config
is not usable with Prettier. More specifically:
space-before-function-paren
cannot be used because Prettier adds space automatically and there is no option to disable it. comma-dangle
also cannot be used for same reason. Also I don't see why it exists in first place, since all it does is provides support for IE8, which is irrelevant, but also makes resolving diffs harder.@cyberalien ok, I'll make a PR later, I'm busy right now, later you can change what you want.
EDIT: The new PR will have conflicts since the base is now this PR.
About prettier ask about it to Anthony.
Added that type to
@iconify/types
asIconifyJSONPackageExports
.Yes, this stuff belongs to that issue, so can continue there.
And yes, that branch with workspaces looks promising. I think it would be a good idea to use it.
Have you release that new version? On the repo I cannot see IconifyJSONPackageExports
type.
OK I can see it, it is on next branch, and published on npm.
Don't worry about conflicts, just base it on last commit before my changes or overwrite stuff. I'll redo formatting changes later.
Don't worry about conflicts, just base it on last commit before my changes or overwrite stuff. I'll redo formatting changes later.
You have it merged
A small update on code I've posted above. If you are using code to convert legacy icon set info to proper type, that function is now part of Utils package to get rid of code duplication:
import { convertIconSetInfo } from '@iconify/utils/lib/icon-set/convert-info';
@cyberalien that code should be used on the PR opened, we'll use it to generate the test before you publish it.
I have included types declared on
iconify
types.