Socket
Socket
Sign inDemoInstall

grunt-ts

Package Overview
Dependencies
Maintainers
3
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 1.7.4 to 1.7.5-1

2

package.json

@@ -5,3 +5,3 @@ {

"description": "Compile and manage your TypeScript project",
"version": "1.7.4",
"version": "1.7.5-1",
"homepage": "https://github.com/grunt-ts/grunt-ts",

@@ -8,0 +8,0 @@ "repository": {

@@ -197,3 +197,3 @@ # grunt-ts

"grunt-ts" : "~1.7.3",
"typescript" : "0.9.7",
"typescript" : "0.9.7"
}

@@ -200,0 +200,0 @@ }

@@ -60,8 +60,9 @@ /// <reference path="../defs/tsd.d.ts"/>

*/
function getTempFile(prefix, dir) {
function getTempFile(prefix, dir, extension) {
if (typeof dir === "undefined") { dir = ''; }
if (typeof extension === "undefined") { extension = '.tmp.txt'; }
prefix = (prefix ? prefix + '-' : '');
var attempts = 100;
do {
var name = prefix + getRandomHex(8) + '.tmp.txt';
var name = prefix + getRandomHex(8) + extension;
var dest = path.join(dir, name);

@@ -385,2 +386,4 @@

var fastCompiling = false;
var baseDirFile = 'ignoreBaseDirFile.ts';
var baseDirFilePath;

@@ -397,2 +400,3 @@ // If fast compile and a file changed

var intersect = _.intersection(completeFiles, [path.resolve(changedFile)]);
if (intersect) {

@@ -404,2 +408,12 @@ files = intersect;

// If baseDir is specified create a temp tsc file to make sure that `--outDir` works fine
// see https://github.com/grunt-ts/grunt-ts/issues/77
if (target.outDir && target.baseDir && files.length > 0) {
baseDirFilePath = path.join(target.baseDir, baseDirFile);
if (!fs.existsSync(baseDirFilePath)) {
fs.writeFileSync(baseDirFilePath, '// Ignore this file. See https://github.com/grunt-ts/grunt-ts/issues/77');
}
files.push(baseDirFilePath);
}
// Create the index if specified

@@ -406,0 +420,0 @@ var index = target.index;

@@ -34,2 +34,3 @@ /// <reference path="../defs/tsd.d.ts"/>

outDir: string; // if sepecified e.g. '/build/js' all output js files are put in this location
baseDir: string; // If specified. outDir files are made relative to this.
html: string[]; // if specified this is used to generate typescript files with a single variable which contains the content of the html

@@ -125,7 +126,7 @@ watch: string; // if specified watches all files in this directory for changes.

*/
function getTempFile(prefix?: string, dir: string = ''): string {
function getTempFile(prefix?: string, dir: string = '', extension = '.tmp.txt'): string {
prefix = (prefix ? prefix + '-' : '');
var attempts = 100;
do {
var name: string = prefix + getRandomHex(8) + '.tmp.txt';
var name: string = prefix + getRandomHex(8) + extension;
var dest: string = path.join(dir, name);

@@ -461,2 +462,4 @@

var fastCompiling = false;
var baseDirFile: string = 'ignoreBaseDirFile.ts';
var baseDirFilePath: string;

@@ -472,2 +475,3 @@ // If fast compile and a file changed

var intersect = _.intersection(completeFiles, [path.resolve(changedFile)]);
if (intersect) {

@@ -479,2 +483,12 @@ files = intersect;

// If baseDir is specified create a temp tsc file to make sure that `--outDir` works fine
// see https://github.com/grunt-ts/grunt-ts/issues/77
if (target.outDir && target.baseDir && files.length > 0) {
baseDirFilePath = path.join(target.baseDir, baseDirFile);
if (!fs.existsSync(baseDirFilePath)) {
fs.writeFileSync(baseDirFilePath, '// Ignore this file. See https://github.com/grunt-ts/grunt-ts/issues/77');
}
files.push(baseDirFilePath);
}
// Create the index if specified

@@ -519,2 +533,3 @@ var index = target.index;

return runCompilation(files, target, options).then((success: boolean) => {
// Create the loader if specified & compiliation succeeded

@@ -521,0 +536,0 @@ if (!fastCompiling && success && !!amdloaderPath) {

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