Comparing version 1.7.4 to 1.7.5-1
@@ -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
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
159619
2248
0
1