Comparing version 0.2.4 to 0.2.5
@@ -10,9 +10,4 @@ module.exports = function (grunt) { | ||
}, | ||
ts:{ | ||
work:{ | ||
src:["test/work.ts"] | ||
}, | ||
fail:{ | ||
src:["test/fail.ts"] | ||
} | ||
ts:{ | ||
src:["test/fail.ts","test/work.ts"] | ||
} | ||
@@ -23,5 +18,5 @@ }); | ||
grunt.loadNpmTasks("grunt-contrib-clean"); | ||
grunt.registerTask("test", ["clean", "ts:work", "ts:fail"]); | ||
grunt.registerTask("test", ["clean", "ts"]); | ||
grunt.registerTask("default", ["test"]); | ||
}; |
@@ -5,3 +5,3 @@ { | ||
"description": "compile typescript to javascript using computer installed typescript", | ||
"version": "0.2.4", | ||
"version": "0.2.5", | ||
"homepage": "https://github.com/basarat/grunt-ts", | ||
@@ -8,0 +8,0 @@ "repository": { |
@@ -12,4 +12,6 @@ grunt-ts | ||
Compiles all files. Stops on a compilation error reporting it on the console. Makes for easier reading. | ||
Check out the complete code: https://github.com/basarat/grunt-ts/blob/master/tasks/ts.ts | ||
Compiles all files. Stops on a compilation error reporting it on the console. Makes for easier view. | ||
## Documentation | ||
@@ -16,0 +18,0 @@ You'll need to install `grunt-ts` first: |
@@ -31,2 +31,4 @@ module.exports = function (grunt) { | ||
grunt.registerMultiTask('ts', 'Compile TypeScript files', function () { | ||
var success = true; | ||
var that = this; | ||
@@ -47,10 +49,11 @@ | ||
if (result.code != 0) { | ||
grunt.fail.warn("Failed to compile file: " + file); | ||
console.log("output: ".cyan); | ||
console.log(result.output.yellow); | ||
return false; | ||
var msg = "Continuing, But failed to compile file: " + file; | ||
console.log(msg.red); | ||
success = false; | ||
} | ||
}); | ||
}); | ||
return true; | ||
}); | ||
}; |
@@ -69,4 +69,7 @@ /* | ||
var tsc = getTsc(resolveTypeScriptBinPath(currentPath, 0)); | ||
grunt.registerMultiTask('ts', 'Compile TypeScript files', function () { | ||
// Was the whole process successful | ||
var success = true; | ||
var that = this; | ||
@@ -91,11 +94,14 @@ | ||
if (result.code != 0) { | ||
grunt.fail.warn("Failed to compile file: " + file); | ||
console.log("output: ".cyan); | ||
console.log(result.output.yellow); | ||
return false; | ||
var msg = "Continuing, But failed to compile file: " + file; | ||
console.log(msg.red); | ||
success = false; | ||
} | ||
}); | ||
}); | ||
// return success; | ||
// return true so that your watch continues and does not fail: | ||
return true; | ||
}); | ||
}; |
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
9047
37