Skip to content

Commit 28e9a2a

Browse files
committed
refactor: disabled build watchers
1 parent 39033a7 commit 28e9a2a

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

apps/showcase/scripts/build-contents.mjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
/* @todo: improve this script to only build the changed file instead of rebuilding everything */
2+
/*
13
import { exec } from 'child_process';
24
import chokidar from 'chokidar';
35
@@ -28,3 +30,4 @@ watcher
2830
.on('error', function () {
2931
//console.error('⛔Error happened', error);
3032
});
33+
*/

apps/showcase/scripts/generate-source.mjs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import chokidar from 'chokidar';
1+
//import chokidar from 'chokidar';
22
import fs from 'fs/promises';
3-
import { globSync } from 'glob';
3+
//import { globSync } from 'glob';
44
import path from 'path';
55
import * as prettier from 'prettier';
66

7-
const INPUT_DIR = 'doc/**/demo.tsx';
7+
//const INPUT_DIR = 'doc/**/demo.tsx';
88
const OUTPUT_FILE = 'source.auto.ts';
99

1010
/**
@@ -61,6 +61,7 @@ function extractCodeSections(content) {
6161
return sections;
6262
}
6363

64+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
6465
async function generate(filePath) {
6566
try {
6667
const content = await fs.readFile(filePath, 'utf8');
@@ -100,7 +101,8 @@ export const source = ${JSON.stringify(source, null, 4)};
100101
}
101102

102103
export function run() {
103-
globSync(INPUT_DIR).forEach(async (filePath) => {
104+
/* @todo: improve this script to only build the changed file instead of rebuilding everything */
105+
/*globSync(INPUT_DIR).forEach(async (filePath) => {
104106
const watcher = chokidar.watch(filePath, { ignored: /^\./, persistent: true });
105107
106108
watcher
@@ -120,7 +122,7 @@ export function run() {
120122
.on('error', function () {
121123
//console.error('⛔Error happened', error);
122124
});
123-
});
125+
});*/
124126
}
125127

126128
run();

0 commit comments

Comments
 (0)