mirror of https://github.com/vector-im/riot-web
parent
c944a273d0
commit
472c07c0a8
|
@ -165,7 +165,7 @@ function watchLanguage(lang: string, dest: string, langFileMap: Record<string, s
|
||||||
// XXX: Use a debounce because for some reason if we read the language
|
// XXX: Use a debounce because for some reason if we read the language
|
||||||
// file immediately after the FS event is received, the file contents
|
// file immediately after the FS event is received, the file contents
|
||||||
// appears empty. Possibly https://github.com/nodejs/node/issues/6112
|
// appears empty. Possibly https://github.com/nodejs/node/issues/6112
|
||||||
let makeLangDebouncer: number;
|
let makeLangDebouncer: ReturnType<typeof setTimeout>;
|
||||||
const makeLang = (): void => {
|
const makeLang = (): void => {
|
||||||
if (makeLangDebouncer) {
|
if (makeLangDebouncer) {
|
||||||
clearTimeout(makeLangDebouncer);
|
clearTimeout(makeLangDebouncer);
|
||||||
|
|
|
@ -15,12 +15,16 @@ limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import "cpx";
|
import "cpx";
|
||||||
import type EventEmitter from "events";
|
|
||||||
|
|
||||||
declare module "cpx" {
|
declare module "cpx" {
|
||||||
export class Cpx extends EventEmitter {
|
export class Cpx {
|
||||||
public constructor(source: string, outDir: string, options?: object);
|
public constructor(source: string, outDir: string, options?: object);
|
||||||
|
|
||||||
|
public on(eventName: "copy", fn: (event: { srcPath: string; dstPath: string }) => void): void;
|
||||||
|
public on(eventName: "remove", fn: (event: { path: string }) => void): void;
|
||||||
|
public on(eventName: "watch-ready", fn: () => void): void;
|
||||||
|
public on(eventName: "watch-error", fn: (error: Error) => void): void;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Copy all files that matches `this.source` pattern to `this.outDir`.
|
* Copy all files that matches `this.source` pattern to `this.outDir`.
|
||||||
*
|
*
|
||||||
|
|
|
@ -26,5 +26,8 @@
|
||||||
"./test/**/*.ts",
|
"./test/**/*.ts",
|
||||||
"./test/**/*.tsx",
|
"./test/**/*.tsx",
|
||||||
"./scripts/*.ts"
|
"./scripts/*.ts"
|
||||||
]
|
],
|
||||||
|
"ts-node": {
|
||||||
|
"files": true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue