
Security News
Deno 2.6 + Socket: Supply Chain Defense In Your CLI
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.
grunt-fontello-react
Advanced tools
Generates a react component from a fontello SVG icon. View the demo here.
You can either download your font manually into your application or use the CLI to fetch your font on build and then use Grunt with these possible options.
module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-fontello-react');
grunt.initConfig({
'fontello-react': {
target: {
options: {}
},
another-target: {
options: {}
}
}
});
}
Then run grunt fontello-react:target.
You can see a working Gruntfile.js in this repository. Simply follow these steps to run it.
Paths are relative to the location of your Gruntfile.js.
{
adapter: 'fontello', // Only adapter available currently
svgPath: './font/fontello.svg', // Path to SVG
woffPath: './font/fontello.woff', // Path to WOFF
eotPath: './font/fontello.eot', // Path to EOT
ttfPath: './font/fontello.ttf', // Path to TTF
fontName: 'fontello', // Font name to use in CSS 'font-style'
jsTplPath: './src/templates/custom-js.tpl', // React component template (to use your own)
cssTplPath: './src/templates/custom-css.tpl', // CSS template (to use your own)
jsOutputPath: './dist/components/view.js', // Location of React component output
cssOutputPath: './dist/components/css.css' // Location of CSS output
}
In your application simply require the generated component.
var React = require('react'),
Icon = require('./the/output/component.js');
// CSS may need to be included seperately if using the non CSS module template.
React.render(
<Icon name="name-of-icon"/>,
document.getElementById('content')
);
The templates which are used to generate the output are here. One uses the default CSS you get in the fontello download. The other uses modified CSS to work with Webpacks css-loader. They use underscore.
npm installnpm install grunt-cli -ggruntnpm install webpack -gwebpack --config=webpack.default.config.jsOpen the dist/index.html.
FAQs
Generates a react component from a Fontello SVG icon
We found that grunt-fontello-react 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
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.

Security News
New DoS and source code exposure bugs in React Server Components and Next.js: what’s affected and how to update safely.

Security News
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.