rollup-plugin-typescript2
Advanced tools
Comparing version 0.1.1 to 0.1.2
@@ -409,4 +409,12 @@ /* eslint-disable */ | ||
var output = services.getEmitOutput(id); | ||
if (output.emitSkipped) | ||
_this.error({ message: colors.red("failed to transpile " + id) }); | ||
if (output.emitSkipped) { | ||
var diagnostics = cache.getDiagnostics(id, snapshot, function () { | ||
return services | ||
.getCompilerOptionsDiagnostics() | ||
.concat(services.getSyntacticDiagnostics(id)) | ||
.concat(services.getSemanticDiagnostics(id)); | ||
}); | ||
printDiagnostics(_this, diagnostics); | ||
_this.error(colors.red("failed to transpile " + id)); | ||
} | ||
var transpiled = _.find(output.outputFiles, function (entry) { return _.endsWith(entry.name, ".js"); }); | ||
@@ -422,2 +430,3 @@ var map$$1 = _.find(output.outputFiles, function (entry) { return _.endsWith(entry.name, ".map"); }); | ||
outro: function () { | ||
context.debug("outro"); | ||
cache.compileDone(); | ||
@@ -424,0 +433,0 @@ if (options.check) { |
@@ -414,4 +414,12 @@ /* eslint-disable */ | ||
var output = services.getEmitOutput(id); | ||
if (output.emitSkipped) | ||
_this.error({ message: red("failed to transpile " + id) }); | ||
if (output.emitSkipped) { | ||
var diagnostics = cache.getDiagnostics(id, snapshot, function () { | ||
return services | ||
.getCompilerOptionsDiagnostics() | ||
.concat(services.getSyntacticDiagnostics(id)) | ||
.concat(services.getSemanticDiagnostics(id)); | ||
}); | ||
printDiagnostics(_this, diagnostics); | ||
_this.error(red("failed to transpile " + id)); | ||
} | ||
var transpiled = find(output.outputFiles, function (entry) { return endsWith(entry.name, ".js"); }); | ||
@@ -427,2 +435,3 @@ var map$$1 = find(output.outputFiles, function (entry) { return endsWith(entry.name, ".map"); }); | ||
outro: function () { | ||
context.debug("outro"); | ||
cache.compileDone(); | ||
@@ -429,0 +438,0 @@ if (options.check) { |
{ | ||
"name": "rollup-plugin-typescript2", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "Seamless integration between Rollup and TypeScript. Now with errors.", | ||
@@ -5,0 +5,0 @@ "main": "dist/rollup-plugin-typescript2.cjs.js", |
@@ -1,10 +0,6 @@ | ||
interface Message | ||
{ | ||
message: string; | ||
} | ||
export interface IRollupContext | ||
{ | ||
warn(message: Message | string): void; | ||
error(message: Message | string): void; | ||
warn(message: string): void; | ||
error(message: string): void; | ||
} | ||
@@ -11,0 +7,0 @@ |
@@ -75,3 +75,3 @@ import { IContext, ConsoleContext, IRollupContext, VerbosityLevel } from "./context"; | ||
function printDiagnostics(context: IContext, diagnostics: IDiagnostics[]) | ||
function printDiagnostics(context: IContext | IRollupContext, diagnostics: IDiagnostics[]) | ||
{ | ||
@@ -173,3 +173,13 @@ _.each(diagnostics, (diagnostic) => | ||
if (output.emitSkipped) | ||
this.error({ message: colors.red(`failed to transpile ${id}`)}); | ||
{ | ||
const diagnostics = cache.getDiagnostics(id, snapshot, () => | ||
{ | ||
return services | ||
.getCompilerOptionsDiagnostics() | ||
.concat(services.getSyntacticDiagnostics(id)) | ||
.concat(services.getSemanticDiagnostics(id)); | ||
}); | ||
printDiagnostics(this, diagnostics); | ||
this.error(colors.red(`failed to transpile ${id}`)); | ||
} | ||
@@ -190,2 +200,3 @@ const transpiled = _.find(output.outputFiles, (entry: ts.OutputFile) => _.endsWith(entry.name, ".js") ); | ||
{ | ||
context.debug("outro"); | ||
cache.compileDone(); | ||
@@ -192,0 +203,0 @@ |
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
58941
1409