Skip to content

Commit 656ff9b

Browse files
authored
Merge pull request #2191 from umbraco/v14/chore/bundle-static-file-package
Chore: Bundle Static File Package
2 parents 5ba5233 + bbafbf5 commit 656ff9b

File tree

8 files changed

+42
-8
lines changed

8 files changed

+42
-8
lines changed

package-lock.json

Lines changed: 9 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@
145145
"./src/packages/packages",
146146
"./src/packages/property-editors",
147147
"./src/packages/search",
148+
"./src/packages/static-file",
148149
"./src/packages/tags",
149150
"./src/packages/templating",
150151
"./src/packages/tiny-mce",

src/packages/static-file/modals/static-file-picker-modal.token.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { UMB_STATIC_FILE_TREE_ALIAS } from '../tree/manifests.js';
1+
import { UMB_STATIC_FILE_TREE_ALIAS } from '../tree/index.js';
22
import type { UmbStaticFileItemModel } from '../repository/item/types.js';
33
import {
44
type UmbTreePickerModalValue,

src/packages/static-file/package.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"name": "@umbraco-backoffice/static-file",
3+
"private": true,
4+
"type": "module",
5+
"scripts": {
6+
"build": "vite build"
7+
}
8+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export const UMB_STATIC_FILE_TREE_REPOSITORY_ALIAS = 'Umb.Repository.StaticFile.Tree';
2+
export const UMB_STATIC_FILE_TREE_STORE_ALIAS = 'Umb.Store.StaticFile.Tree';
3+
export const UMB_STATIC_FILE_TREE_ALIAS = 'Umb.Tree.StaticFile';
4+
export const UMB_STATIC_FILE_TREE_ITEM_ALIAS = 'Umb.TreeItem.StaticFile';

src/packages/static-file/tree/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ export {
33
UMB_STATIC_FILE_TREE_REPOSITORY_ALIAS,
44
UMB_STATIC_FILE_TREE_STORE_ALIAS,
55
UMB_STATIC_FILE_TREE_ALIAS,
6-
} from './manifests.js';
6+
} from './constants.js';

src/packages/static-file/tree/manifests.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ import {
33
UMB_STATIC_FILE_FOLDER_ENTITY_TYPE,
44
UMB_STATIC_FILE_ROOT_ENTITY_TYPE,
55
} from '../entity.js';
6+
import {
7+
UMB_STATIC_FILE_TREE_ALIAS,
8+
UMB_STATIC_FILE_TREE_ITEM_ALIAS,
9+
UMB_STATIC_FILE_TREE_REPOSITORY_ALIAS,
10+
UMB_STATIC_FILE_TREE_STORE_ALIAS,
11+
} from './constants.js';
612
import type {
713
ManifestRepository,
814
ManifestTree,
@@ -11,11 +17,6 @@ import type {
1117
ManifestTypes,
1218
} from '@umbraco-cms/backoffice/extension-registry';
1319

14-
export const UMB_STATIC_FILE_TREE_REPOSITORY_ALIAS = 'Umb.Repository.StaticFile.Tree';
15-
export const UMB_STATIC_FILE_TREE_STORE_ALIAS = 'Umb.Store.StaticFile.Tree';
16-
export const UMB_STATIC_FILE_TREE_ALIAS = 'Umb.Tree.StaticFile';
17-
export const UMB_STATIC_FILE_TREE_ITEM_ALIAS = 'Umb.TreeItem.StaticFile';
18-
1920
const treeRepository: ManifestRepository = {
2021
type: 'repository',
2122
alias: UMB_STATIC_FILE_TREE_REPOSITORY_ALIAS,
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { defineConfig } from 'vite';
2+
import { rmSync } from 'fs';
3+
import { getDefaultConfig } from '../../vite-config-base';
4+
5+
const dist = '../../../dist-cms/packages/static-file';
6+
7+
// delete the unbundled dist folder
8+
rmSync(dist, { recursive: true, force: true });
9+
10+
export default defineConfig({
11+
...getDefaultConfig({ dist }),
12+
});

0 commit comments

Comments
 (0)