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: Performance Profiling Package and Bundle #2198

Merged
merged 4 commits into from
Aug 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 25 additions & 9 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 @@ -144,6 +144,7 @@
"./src/packages/models-builder",
"./src/packages/multi-url-picker",
"./src/packages/packages",
"./src/packages/performance-profiling",
"./src/packages/property-editors",
"./src/packages/relations",
"./src/packages/search",
Expand Down
1 change: 1 addition & 0 deletions src/apps/backoffice/backoffice.element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const CORE_PACKAGES = [
import('../../packages/models-builder/umbraco-package.js'),
import('../../packages/multi-url-picker/umbraco-package.js'),
import('../../packages/packages/umbraco-package.js'),
import('../../packages/performance-profiling/umbraco-package.js'),
import('../../packages/property-editors/umbraco-package.js'),
import('../../packages/relations/umbraco-package.js'),
import('../../packages/search/umbraco-package.js'),
Expand Down
19 changes: 19 additions & 0 deletions src/packages/performance-profiling/manifests.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
export const manifests = [
{
type: 'dashboard',
alias: 'Umb.Dashboard.Profiling',
name: 'Profiling',
element: () => import('./dashboard-performance-profiling.element.js'),
weight: 101,
meta: {
label: '#dashboardTabs_settingsProfiler',
pathname: 'profiling',
},
conditions: [
{
alias: 'Umb.Condition.SectionAlias',
match: 'Umb.Section.Settings',
},
],
},
];
8 changes: 8 additions & 0 deletions src/packages/performance-profiling/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": "@umbraco-backoffice/performance-profiling",
"private": true,
"type": "module",
"scripts": {
"build": "vite build"
}
}
9 changes: 9 additions & 0 deletions src/packages/performance-profiling/umbraco-package.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export const name = 'Umbraco.Core.PerformanceProfiling';
export const extensions = [
{
name: 'Performance Profiling Bundle',
alias: 'Umb.Bundle.PerformanceProfiling',
type: 'bundle',
js: () => import('./manifests.js'),
},
];
18 changes: 18 additions & 0 deletions src/packages/performance-profiling/vite.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { defineConfig } from 'vite';
import { rmSync } from 'fs';
import { getDefaultConfig } from '../../vite-config-base';

const dist = '../../../dist-cms/packages/performance-profiling';

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

export default defineConfig({
...getDefaultConfig({
dist,
entry: {
manifests: 'manifests.ts',
'umbraco-package': 'umbraco-package.ts',
},
}),
});
17 changes: 0 additions & 17 deletions src/packages/settings/dashboards/manifests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,6 @@ const dashboards: Array<ManifestDashboard> = [
},
],
},
{
type: 'dashboard',
alias: 'Umb.Dashboard.Profiling',
name: 'Profiling',
element: () => import('./performance-profiling/dashboard-performance-profiling.element.js'),
weight: 101,
meta: {
label: '#dashboardTabs_settingsProfiler',
pathname: 'profiling',
},
conditions: [
{
alias: 'Umb.Condition.SectionAlias',
match: sectionAlias,
},
],
},
];

export const manifests: Array<ManifestTypes> = [...dashboards];
Loading