grafana/packages/grafana-icons/rollup.config.ts
Alex Khomenko b9b42ba10f
Grafana/icons: Add icons package (#82314)
* 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
2024-03-20 17:03:40 +02:00

31 lines
705 B
TypeScript

import resolve from '@rollup/plugin-node-resolve';
import path from 'path';
import dts from 'rollup-plugin-dts';
import esbuild from 'rollup-plugin-esbuild';
import externals from 'rollup-plugin-node-externals';
import pkg from './package.json';
export default [
{
input: 'src/index.ts',
plugins: [externals({ deps: true, packagePath: './package.json' }), resolve(), esbuild()],
output: [
{
format: 'esm',
sourcemap: true,
dir: path.dirname(pkg.publishConfig.module),
preserveModules: true,
},
],
},
{
input: 'src/index.ts',
plugins: [dts()],
output: {
file: pkg.publishConfig.types,
format: 'es',
},
},
];