mirror of
https://github.com/Mibew/simple-icons.git
synced 2024-11-15 18:04:12 +03:00
1a77d28227
* export all icons from a single file (#6189) * fix: revert formatting, add exports to package.json * feat: generate icons.js and add relevant exports field * add minifyAndWrite Co-authored-by: Eric Cornelissen <ericornelissen@gmail.com> * fix: minifyAndWrite build * add type: commonjs Co-authored-by: Eric Cornelissen <ericornelissen@gmail.com> * simplify exports Co-authored-by: Eric Cornelissen <ericornelissen@gmail.com> * add "require" in exports * place objects directly in barrel file * write exports minified Co-authored-by: Eric Cornelissen <ericornelissen@gmail.com> * fix formatting Co-authored-by: Eric Cornelissen <ericornelissen@gmail.com> * refactor slugToVariableName code into a function * fix slugToVariableName * change prefix to "si" * move slugToVariableName to local helper functions * unignore icons.js and icons.mjs Co-authored-by: Eric Cornelissen <ericornelissen@gmail.com> * feat: add types (#6580) * feat: add types * fix linting error * export default from types/index.d.ts * minify * revert formatting changes * revert formatting change * change paths from types/index.d.ts to index.d.ts * mark icons.get as deprecated * move type alias to another file * update readme * update readme.md Co-authored-by: Eric Cornelissen <ericornelissen@gmail.com> * update typescript usage section Co-authored-by: Eric Cornelissen <ericornelissen@gmail.com> * fix conflicts * Apply suggestions from code review Co-authored-by: Eric Cornelissen <ericornelissen@gmail.com> * add writeTs function Co-authored-by: Eric Cornelissen <ericornelissen@gmail.com>
26 lines
443 B
TypeScript
26 lines
443 B
TypeScript
export interface SimpleIcon {
|
|
title: string;
|
|
slug: string;
|
|
svg: string;
|
|
path: string;
|
|
source: string;
|
|
hex: string;
|
|
guidelines?: string | undefined;
|
|
license?:
|
|
| {
|
|
type: string;
|
|
url: string;
|
|
}
|
|
| undefined;
|
|
}
|
|
|
|
declare const icons: Record<string, SimpleIcon> & {
|
|
/**
|
|
* @deprecated use .Get instead
|
|
*/
|
|
get(name: string): SimpleIcon;
|
|
Get(name: string): SimpleIcon;
|
|
};
|
|
|
|
export default icons;
|