Comparing version 0.7.0 to 0.7.1
@@ -5,3 +5,3 @@ { | ||
"description": "Compile typescript files to javascript using tsc command", | ||
"version": "0.7.0", | ||
"version": "0.7.1", | ||
"homepage": "https://github.com/basarat/grunt-ts", | ||
@@ -8,0 +8,0 @@ "repository": { |
@@ -66,2 +66,4 @@ // Typescript imports | ||
// Note: this funciton is called once for each target | ||
// so task + target options are a bit blurred inside this function | ||
grunt.registerMultiTask('ts', 'Compile TypeScript files', function () { | ||
@@ -152,3 +154,3 @@ var currenttask = this; | ||
// Also this funciton is debounced | ||
var debouncedCompile = _.debounce(function () { | ||
function filterFilesAndCompile() { | ||
// Reexpand the original file glob: | ||
@@ -164,6 +166,7 @@ var files = grunt.file.expand(currenttask.data.src); | ||
runCompilation(files); | ||
}, 150); | ||
} | ||
var debouncedCompile = _.debounce(filterFilesAndCompile, 150); | ||
// Initial compilation: | ||
debouncedCompile(); | ||
filterFilesAndCompile(); | ||
@@ -170,0 +173,0 @@ // Watches all the files |
@@ -112,3 +112,4 @@ /// <reference path="../defs/grunt/grunt.d.ts"/> | ||
// Note: this funciton is called once for each target | ||
// so task + target options are a bit blurred inside this function | ||
grunt.registerMultiTask('ts', 'Compile TypeScript files', function () { | ||
@@ -126,3 +127,3 @@ | ||
comments: false | ||
}); | ||
}); | ||
@@ -207,17 +208,18 @@ // Was the whole process successful | ||
// Also this funciton is debounced | ||
var debouncedCompile = _.debounce(() => { | ||
// Reexpand the original file glob: | ||
var files = grunt.file.expand(currenttask.data.src); | ||
function filterFilesAndCompile() { | ||
// Reexpand the original file glob: | ||
var files = grunt.file.expand(currenttask.data.src); | ||
// Clear the files of output.d.ts and reference.ts | ||
files = _.filter(files, (filename) => { | ||
return (!isReferenceFile(filename) && !isOutFile(filename)); | ||
}); | ||
// Clear the files of output.d.ts and reference.ts | ||
files = _.filter(files, (filename) => { | ||
return (!isReferenceFile(filename) && !isOutFile(filename)); | ||
}); | ||
// compile | ||
runCompilation(files); | ||
}, 150); // randomly chosen 150. Choice was made because chokidar looks at file system every 100ms | ||
// compile | ||
runCompilation(files); | ||
} | ||
var debouncedCompile = _.debounce(filterFilesAndCompile, 150); // randomly chosen 150. Choice was made because chokidar looks at file system every 100ms | ||
// Initial compilation: | ||
debouncedCompile(); | ||
filterFilesAndCompile(); | ||
@@ -224,0 +226,0 @@ // Watches all the files |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
59096
34
974