Skip to content

Commit c546e38

Browse files
committed
refactor: clean up unused components and update build scripts
1 parent 9443a4c commit c546e38

File tree

17 files changed

+38
-58
lines changed

17 files changed

+38
-58
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
# Playwright
88
node_modules/
9+
dist/
910
/test-results/
1011
/playwright-report/
1112
/blob-report/

.idea/indexLayout.xml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/projectSettingsUpdater.xml

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

_build_scripts/build-component.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,16 @@ await init();
66
const encoder = new TextEncoder();
77
const decoder = new TextDecoder();
88

9-
export async function buildComponent(componentName: string) {
9+
export async function buildComponent(componentName: string, copyFolders: string[] = []) {
1010
console.log(`Building ${componentName}`);
1111
await build_src(componentName);
1212
await copy_files(componentName);
13+
14+
if (copyFolders.length > 0) {
15+
for (const folder of copyFolders) {
16+
await copyFilesToFolder(`components/${componentName}/${folder}`, `dist/components/${componentName}/${folder}`);
17+
}
18+
}
1319
}
1420

1521
async function build_src(componentName: string) {
@@ -42,11 +48,6 @@ async function copy_files(componentName: string) {
4248
continue;
4349
}
4450

45-
if (entry.isDirectory) {
46-
await copyFilesToFolder(`${srcFolder}/${entry.name}`, `${distFolder}/${entry.name}`);
47-
continue;
48-
}
49-
5051
if (entry.name.endsWith(".css")) {
5152
await copyCSSFiles(`${srcFolder}/${entry.name}`, `${distFolder}/${entry.name}`);
5253
continue;
@@ -91,6 +92,7 @@ async function copyFilesToFolder(sourceDir: string, targetDir: string) {
9192
for await (const entry of Deno.readDir(sourceDir)) {
9293
const srcPath = `${sourceDir}/${entry.name}`;
9394
const distPath = `${targetDir}/${entry.name}`;
95+
9496
await copy(srcPath, distPath, { overwrite: true });
9597
}
9698
}

_build_scripts/build.ts

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,23 @@ async function cleaerDistFolder() {
1010
await cleaerDistFolder();
1111

1212
// Components
13-
await buildComponent("activity-state");
13+
// await buildComponent("activity-state");
14+
// await buildComponent("app-header");
15+
// await buildComponent("dynamic-rows");
16+
// await buildComponent("dynamic-columns");
17+
await buildComponent("material-icon", ["icons"]);
18+
// await buildComponent("menu");
19+
// await buildComponent("ollama-ui");
20+
// await buildComponent("toast-notification");
21+
// await buildComponent("toolbar");
22+
// await buildComponent("tree-view");
1423

1524
// System Files
16-
await buildSrcFile("system/assert.js");
17-
await buildSrcFile("system/events-manager.js");
18-
await buildSrcFile("system/logger.js");
25+
// await buildSrcFile("system/assert.js");
26+
// await buildSrcFile("system/events-manager.js");
27+
// await buildSrcFile("system/logger.js");
1928

2029
// Validation Files
21-
await buildSrcFile("validate/conditions.js");
30+
// await buildSrcFile("validate/conditions.js");
2231

2332

dist/components/activity-state/activity-state.css

Lines changed: 0 additions & 1 deletion
This file was deleted.

dist/components/activity-state/activity-state.html

Lines changed: 0 additions & 1 deletion
This file was deleted.

dist/components/activity-state/activity-state.js

Lines changed: 0 additions & 2 deletions
This file was deleted.

dist/components/activity-state/activity-state.js.map

Lines changed: 0 additions & 7 deletions
This file was deleted.

dist/src/system/assert.js

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)