https://github.com/becklyn/feather-icon-extractor
Can be used to easily extract feather icons into separate SVGs.
https://github.com/becklyn/feather-icon-extractor
Last synced: 3 months ago
JSON representation
Can be used to easily extract feather icons into separate SVGs.
- Host: GitHub
- URL: https://github.com/becklyn/feather-icon-extractor
- Owner: Becklyn
- License: bsd-3-clause
- Created: 2019-03-27T14:45:34.000Z (about 6 years ago)
- Default Branch: 2.x
- Last Pushed: 2022-02-03T10:33:52.000Z (over 3 years ago)
- Last Synced: 2025-01-14T03:14:19.538Z (4 months ago)
- Language: TypeScript
- Size: 35.2 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
Feather Icon Extractor
======================An icon extractor that is tailored to the data structure of `feather-icons`.
You need (and can) load `feather-icons` yourself, so that all versions are supported that implement the icons listing like the `IconLibrary` defined in `src/Extractor.ts`.Configuration
-------------Import the configurator and pass the target directory (**attention:** the script will clear the directory before extraction!).
Then pass the mapping of icons as object:
* key: `string` new name
* value: one of
* `string` – the name of the icon in feather-icons (will be minified).
* `{name: string, minify: boolean}` – name is the icon of the feather-icons, `minify` specifies whether the icon should be minified.Implementing it in your project
-------------------------------Add a executable file, which can look like this:
```js
#!/usr/bin/env node
const Extractor = require("@becklyn/feather-icons-extractor");
const featherIcons = require("feather-icons");
const path = require("path");(new Extractor(featherIcons.icons, path.join(__dirname, "../assets/icon"))).extract({
add: "plus",
blocked: "slash",
help: {
name: "help-circle",
minify: false,
},
// ...
});```