Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: Bundle tiny-mce package #2141

Merged
merged 12 commits into from
Aug 5, 2024
8 changes: 8 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@
"./src/packages/property-editors",
"./src/packages/tags",
"./src/packages/templating",
"./src/packages/tiny-mce",
"./src/packages/umbraco-news",
"./src/packages/user",
"./src/packages/webhook"
Expand Down
13 changes: 7 additions & 6 deletions src/packages/core/localization/registry/localization.registry.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import type {
UmbLocalizationSetBase,
UmbLocalizationDictionary,
UmbLocalizationFlatDictionary,
} from '@umbraco-cms/backoffice/localization-api';
import {
type UmbLocalizationSetBase,
type UmbLocalizationDictionary,
type UmbLocalizationFlatDictionary,
UMB_DEFAULT_LOCALIZATION_CULTURE
} from "@umbraco-cms/backoffice/localization-api";
import { umbLocalizationManager } from '@umbraco-cms/backoffice/localization-api';
import type { ManifestLocalization, UmbBackofficeExtensionRegistry } from '@umbraco-cms/backoffice/extension-registry';
import { umbExtensionsRegistry } from '@umbraco-cms/backoffice/extension-registry';
Expand All @@ -21,7 +22,7 @@ function addOrUpdateDictionary(
}

export class UmbLocalizationRegistry {
#currentLanguage = new UmbStringState(document.documentElement.lang ?? 'en-us');
#currentLanguage = new UmbStringState(document.documentElement.lang !== '' ? document.documentElement.lang : UMB_DEFAULT_LOCALIZATION_CULTURE);
readonly currentLanguage = this.#currentLanguage.asObservable();

#loadedExtAliases: Array<string> = [];
Expand Down
8 changes: 8 additions & 0 deletions src/packages/tiny-mce/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": "@umbraco-backoffice/tiny-mce",
"private": true,
"type": "module",
"scripts": {
"build": "vite build"
}
}
12 changes: 12 additions & 0 deletions src/packages/tiny-mce/vite.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { defineConfig } from 'vite';
import { rmSync } from 'fs';
import { getDefaultConfig } from '../../vite-config-base';

const dist = '../../../dist-cms/packages/tiny-mce';

// delete the unbundled dist folder
rmSync(dist, { recursive: true, force: true });

export default defineConfig({
...getDefaultConfig({ dist }),
});
Loading