mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
* Add separate icons package * Update package.json * Codeformat * Use the new icon * Sanitize SVGs * Sync deps * Add publish script * Add pre-commit hook * Test pre-commit * Rename * Comment out local dev configs * Add generate action * Update readme * Update script * Add license * Rename icons to icons-generated * Codeformat * Update lerna * Remove fill attribute from SVG path elements * Revert lerna upgrade * Update codeowners * Add lint scripts * Exclude more attributes * Add missing deps * Update lockfile * Remove CI actions * Remove generated components from VC * Fix path * Build ESM only * Include cjs * Update lockfile * Move generated icons into src * Update lockfile * Sync deps with grafana * Update lockfile * Update lockfile * Update package name * Cleanup * Memoize the components * Publish esm only * Do not overwrite props * Add generate script to build * Update comment * Generate typedefs from index.ts * test * test * Restore * Add more complex icons * Add readme * Update lockfile * Make the package private * Move package exclusion to lerna.json * Remove exclusion * Revert * test packages * Fix * Fix * Revert * Move generate icons script to the root * Update script * Remove icons script * Move icons exclusion to package.json
33 lines
708 B
JavaScript
33 lines
708 B
JavaScript
/**
|
|
* Reference: https://react-svgr.com/docs/options/
|
|
*/
|
|
module.exports = {
|
|
icon: '{dir}/[name].gen.js',
|
|
typescript: true,
|
|
jsxRuntime: 'automatic',
|
|
outDir: './src/icons-gen',
|
|
template: require('./templates/icon'),
|
|
indexTemplate: require('./templates/index'),
|
|
memo: true,
|
|
svgoConfig: {
|
|
plugins: [
|
|
// Sanitise the SVGs
|
|
'removeScriptElement',
|
|
],
|
|
},
|
|
jsx: {
|
|
babelConfig: {
|
|
plugins: [
|
|
// Remove fill and id attributes from SVG child elements
|
|
[
|
|
'@svgr/babel-plugin-remove-jsx-attribute',
|
|
{
|
|
elements: ['path', 'g', 'clipPath'],
|
|
attributes: ['id', 'fill'],
|
|
},
|
|
],
|
|
],
|
|
},
|
|
},
|
|
};
|