mirror of
https://github.com/iconify/iconify.git
synced 2024-11-09 23:00:56 +00:00
Add main file to Utils
This commit is contained in:
parent
935f097f51
commit
d661f6c8b4
@ -20,8 +20,14 @@
|
||||
"test:jasmine": "cross-env NODE_OPTIONS=--experimental-vm-modules npx jasmine",
|
||||
"test": "npm run test:jest && npm run test:jasmine"
|
||||
},
|
||||
"main": "./lib/index.js",
|
||||
"module": "./lib/index.mjs",
|
||||
"exports": {
|
||||
"./*": "./*",
|
||||
".": {
|
||||
"require": "./lib/index.js",
|
||||
"import": "./lib/index.mjs"
|
||||
},
|
||||
"./lib/colors": {
|
||||
"require": "./lib/colors/index.js",
|
||||
"import": "./lib/colors/index.mjs"
|
||||
@ -106,6 +112,14 @@
|
||||
"require": "./lib/icon/name.js",
|
||||
"import": "./lib/icon/name.mjs"
|
||||
},
|
||||
"./lib": {
|
||||
"require": "./lib/index.js",
|
||||
"import": "./lib/index.mjs"
|
||||
},
|
||||
"./lib/index": {
|
||||
"require": "./lib/index.js",
|
||||
"import": "./lib/index.mjs"
|
||||
},
|
||||
"./lib/svg/build": {
|
||||
"require": "./lib/svg/build.js",
|
||||
"import": "./lib/svg/build.mjs"
|
||||
|
@ -12,6 +12,10 @@ To install the library run this command:
|
||||
npm install @iconify/utils --save
|
||||
```
|
||||
|
||||
## Documentation
|
||||
|
||||
Documentation is available at [Iconify documentation website](https://docs.iconify.design/tools/utils/).
|
||||
|
||||
## License
|
||||
|
||||
The library is released with MIT license.
|
||||
|
45
packages/utils/src/index.ts
Normal file
45
packages/utils/src/index.ts
Normal file
@ -0,0 +1,45 @@
|
||||
// Customisations
|
||||
export { compare as compareCustomisations } from './customisations/compare';
|
||||
export {
|
||||
defaults as defaultCustomisations,
|
||||
mergeCustomisations,
|
||||
} from './customisations/index';
|
||||
|
||||
// Customisations: converting attributes in components
|
||||
export { toBoolean } from './customisations/bool';
|
||||
export {
|
||||
flipFromString,
|
||||
alignmentFromString,
|
||||
} from './customisations/shorthand';
|
||||
export { rotateFromString } from './customisations/rotate';
|
||||
|
||||
// Icon names
|
||||
export { stringToIcon, validateIcon as validateIconName } from './icon/name';
|
||||
export { matchName as matchIconName } from './icon/index';
|
||||
|
||||
// Icon data
|
||||
export { mergeIconData } from './icon/merge';
|
||||
export {
|
||||
iconDefaults as defaultIconData,
|
||||
fullIcon as fullIconData,
|
||||
} from './icon/index';
|
||||
|
||||
// Icon set functions
|
||||
export { parseIconSet, isVariation } from './icon-set/parse';
|
||||
export { validateIconSet } from './icon-set/validate';
|
||||
export { expandIconSet } from './icon-set/expand';
|
||||
export { minifyIconSet } from './icon-set/minify';
|
||||
export { getIcons } from './icon-set/get-icons';
|
||||
export { getIconData } from './icon-set/get-icon';
|
||||
|
||||
// Icon set: convert information
|
||||
export { convertIconSetInfo } from './icon-set/convert-info';
|
||||
|
||||
// Build SVG
|
||||
export { iconToSVG } from './svg/build';
|
||||
export { replaceIDs } from './svg/id';
|
||||
export { calculateSize } from './svg/size';
|
||||
|
||||
// Colors
|
||||
export { colorKeywords } from './colors/keywords';
|
||||
export { stringToColor, compareColors, colorToString } from './colors/index';
|
Loading…
Reference in New Issue
Block a user