fix(ts2dart): Adjust to new ts2dart API.
This commit is contained in:
parent
3285ffba16
commit
838aa2aaa9
|
@ -13,7 +13,8 @@ function createTs2DartPreprocessor(logger, basePath, config, emitter) {
|
||||||
try {
|
try {
|
||||||
var moduleName = config.resolveModuleName(file.originalPath);
|
var moduleName = config.resolveModuleName(file.originalPath);
|
||||||
file.path = config.transformPath(file.originalPath);
|
file.path = config.transformPath(file.originalPath);
|
||||||
var transpiler = new ts2dart.Transpiler();
|
var transpiler = new ts2dart.Transpiler(
|
||||||
|
{failFast: false, generateLibraryName: true, generateSourceMap: true});
|
||||||
var transpiledContent = transpiler.translateFile(file.originalPath, moduleName);
|
var transpiledContent = transpiler.translateFile(file.originalPath, moduleName);
|
||||||
// TODO(martinprobst): Source maps.
|
// TODO(martinprobst): Source maps.
|
||||||
done(null, transpiledContent);
|
done(null, transpiledContent);
|
||||||
|
|
Loading…
Reference in New Issue