Security News
Introducing the Socket Python SDK
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
icon-maker-loader
Advanced tools
[![Build Status](https://travis-ci.org/unimonkiez/icon-maker-loader.svg?branch=master)](https://travis-ci.org/unimonkiez/icon-maker-loader) # Icon maker loader ##### Webpack loader to load svgs to font files and return the css classes to use that icon. ##
npm install icon-maker-loader
css-loader
and url-loader
.const path = require('path');
module.exports = {
...
module: {
loaders: [
{
test: /\.svg$/,
loader: 'icon-maker',
include: path.join(__dirname, 'icons') // To avoid clash of svgs
}, {
test: /\.css$/, // Have to configure css loader for the generated css
loader: 'css'
}, {
test: /\.(woff|eot|ttf|svg)$/, // Have to configure fonts loaders for the generated fonts
loader: 'url',
exclude: path.join(__dirname, 'icons') // To avoid clash of svgs
}
]
}
};
import React, { Component } from 'react';
import yinYan from './icons/yin-yan.svg'; // You get classes `default default-yin-yan`
export default MyComponent extends Component {
render() {
return (
<div>
Look at my icon!
<span className={yinYan} />
</div>
);
}
}
<div>
Look at my icon!
<span class="${require('./icons/yin-yan.svg')}">
</span>
</div>
fontFamily
- (default icon-maker
), can split your icons to multiple font families (for instance, better loading for different pages of your application).files
- (default eot,svg,ttf,woff
), can decide which font files will be generated.localCss
- (default false
) - will generate css with local scope to be used with css-loader (you can also convert all of your classes to local using css-loader?modules
and then this option is not needed).icon-maker?fontFamily=login&files=eot,svg&localCss
FAQs
[![Build Status](https://travis-ci.org/unimonkiez/icon-maker-loader.svg?branch=master)](https://travis-ci.org/unimonkiez/icon-maker-loader) # Icon maker loader ##### Webpack loader to load svgs to font files and return the css classes to use that icon. ##
The npm package icon-maker-loader receives a total of 8 weekly downloads. As such, icon-maker-loader popularity was classified as not popular.
We found that icon-maker-loader demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
Security News
Floating dependency ranges in npm can introduce instability and security risks into your project by allowing unverified or incompatible versions to be installed automatically, leading to unpredictable behavior and potential conflicts.
Security News
A new Rust RFC proposes "Trusted Publishing" for Crates.io, introducing short-lived access tokens via OIDC to improve security and reduce risks associated with long-lived API tokens.