Grafana UI: Use package.json exports for internal code (#101815)

* feat(grafana-ui): introduce development exports to prevent importing from grafana/ui/src

* refactor(theme-generation): move theme templates into scripts so themes continue to build

* refactor(frontend): replace  grafana/ui paths that use nested src with /internal or /unstable

* chore(betterer): update better results file

* feat(grafana-ui): support enterprise, remove Text component from internal

* docs(packages): update readme with exporting code conventions
This commit is contained in:
Jack Westbrook
2025-03-12 14:14:32 +01:00
committed by GitHub
parent dcba71a0b0
commit c9f563e576
182 changed files with 527 additions and 743 deletions
+4 -3
View File
@@ -2,9 +2,10 @@ import { writeFile } from 'node:fs/promises';
import { resolve } from 'path';
import { createTheme } from '@grafana/data';
import { darkThemeVarsTemplate } from '@grafana/ui/src/themes/_variables.dark.scss.tmpl';
import { lightThemeVarsTemplate } from '@grafana/ui/src/themes/_variables.light.scss.tmpl';
import { commonThemeVarsTemplate } from '@grafana/ui/src/themes/_variables.scss.tmpl';
import { darkThemeVarsTemplate } from './themeTemplates/_variables.dark.scss.tmpl';
import { lightThemeVarsTemplate } from './themeTemplates/_variables.light.scss.tmpl';
import { commonThemeVarsTemplate } from './themeTemplates/_variables.scss.tmpl';
const darkThemeVariablesPath = resolve(__dirname, 'public', 'sass', '_variables.dark.generated.scss');
const lightThemeVariablesPath = resolve(__dirname, 'public', 'sass', '_variables.light.generated.scss');