feat(dart): Use ts2dart for transpilation in Karma Dart.
This commit is contained in:
@ -58,25 +58,14 @@ module.exports = function(config) {
|
||||
},
|
||||
|
||||
preprocessors: {
|
||||
'modules/**/*.js': ['traceur'],
|
||||
'tools/**/*.js': ['traceur']
|
||||
'modules/**/*.js': ['ts2dart'],
|
||||
'tools/**/*.js': ['ts2dart']
|
||||
},
|
||||
|
||||
traceurPreprocessor: {
|
||||
options: {
|
||||
outputLanguage: 'dart',
|
||||
sourceMaps: true,
|
||||
script: false,
|
||||
modules: 'register',
|
||||
memberVariables: true,
|
||||
types: true,
|
||||
// typeAssertions: true,
|
||||
// typeAssertionModule: 'assert',
|
||||
annotations: true
|
||||
},
|
||||
ts2dartPreprocessor: {
|
||||
resolveModuleName: file2moduleName,
|
||||
transformPath: function(fileName) {
|
||||
return fileName.replace('.js', '.dart');
|
||||
return fileName.replace(/.js$/, '.dart');
|
||||
}
|
||||
},
|
||||
|
||||
@ -91,5 +80,5 @@ module.exports = function(config) {
|
||||
});
|
||||
|
||||
|
||||
config.plugins.push(require('./tools/transpiler/karma-traceur-preprocessor'));
|
||||
config.plugins.push(require('./tools/transpiler/karma-ts2dart-preprocessor'));
|
||||
};
|
||||
|
Reference in New Issue
Block a user