Socket
Socket
Sign inDemoInstall

grunt-ts

Package Overview
Dependencies
Maintainers
1
Versions
149
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-ts - npm Package Compare versions

Comparing version 0.7.0 to 0.7.1

test/fail/fail.js

2

package.json

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc