Skip to content

Commit aaf3247

Browse files
authored
Merge pull request #1 from LibanHassan/LibanHassan-patch-1
Altered handleFileEvent to be able to accept extensions other than .ts and .html
2 parents 896e63a + df4a71e commit aaf3247

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

tasks/ts.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -430,23 +430,23 @@ const pluginFn = function (grunt: IGrunt) {
430430

431431
// local event to handle file event
432432
function handleFileEvent(filepath: string, displaystr: string, addedOrChanged: boolean = false) {
433-
433+
434434
const acceptedExtentions = ['.ts', '.tsx', '.js', '.jsx', '.html'];
435-
435+
436436
acceptedExtentions.forEach(
437437
(extension) => {
438-
438+
439439
// If extension is accepted and was not just run
440440
if (utils.endsWith(filepath.toLowerCase(), extension) && (new Date().getTime() - lastCompile) > 100){
441-
441+
442442
// Log and run the debounced version.
443443
grunt.log.writeln((displaystr + ' >>' + filepath).yellow);
444444

445445
filterFilesTransformAndCompile();
446-
446+
447447
return;
448448
}
449-
449+
450450
// Uncomment for debugging which files were ignored
451451
// else if ((new Date().getTime() - lastCompile) <= 100){
452452
// grunt.log.writeln((' ///' + ' >>' + filepath).grey);

0 commit comments

Comments
 (0)