Security News
cURL Project and Go Security Teams Reject CVSS as Broken
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
@icon-magic/build
Advanced tools
The build is responsible for constructing all the various flavors that an icon can exist in from it's different variants, after applying the build plugins on the variants. It moves these resulting flavors to the destination folder renaming the icon if necessary. It also generates a config file, one for each icon and stores it along with the icon it's in output folder.
Build transforms the variants into flavors by applying all the build plugins on each variant of each icon. Plugins are applied in the order in which they appear. This will result in different flavors of the icon, which are added to the icons config. @param iconConfig a map of the iconPaths to it's config json
The build function that takes in a mapping of the path to the icon directory and
a configuration of the icon itself. For example, we contain a directory (as
below) for nav-icons
(navigation icons). This directory contains one icon, the
home
icon which has two variants - filled.svg
and outline.svg
.
nav-icons
├── home
│ ├── filled.svg
│ └── outline.svg
computer
│ ├── filled.svg
│ └── outline.svg
├── iconrc.json
nav-icons
also contains an iconrc.json
that is applicable to all the icons
within nav-icons
including the home
and computer
icon. After we get the config from
config-reader
's getIconConfigSet()
, each Icon will have it's own config with
resolved iconPaths as below:
[
'/Users/rchitloo/workspace/icon-magic/packages/@icon-magic/config-reader/test/fixtures/nav-icons/home',
{
iconPath:
'/Users/rchitloo/workspace/icon-magic/packages/@icon-magic/config-reader/test/fixtures/nav-icons/home',
variants: [
{ path: './filled.svg' },
{ name: 'someOtherName', path: './outline.svg' }
],
build: { outputPath: './out' },
sourceConfigFile:
'/Users/rchitloo/workspace/icon-magic/packages/@icon-magic/config-reader/test/fixtures/nav-icons/iconrc.json'
}
];
With this input set of icons, build creates Icon classes in memory and then goes on to apply all the build plugins on each variant of the icon, transforming it into one or multiple flavors and writing the resulting flavors into the output. All the while, the icon in memory is updated with the newly generated flavors. After all the plugins are applied, the build then writes the config of each icon to form an icon bundle consisting of
build() then returns a Map of the path to the icon directory and it's corresponding Icon class so it can be chained to the next steps of the icon generation process
Currently, we don't have any default build plugins but these are an ideal place to add css classes on the .svg icon for to generate different color themes of the icon. All .svg manipulations to generate flavors are done as part of the build process via build plugins
For more details on the interfaces, refer to @icon-magic/icon-models
FAQs
Icon magic blueprint package.
The npm package @icon-magic/build receives a total of 12 weekly downloads. As such, @icon-magic/build popularity was classified as not popular.
We found that @icon-magic/build demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.