broccoli-directory
Version:
Broccoli Directory provides familiar map/reduce/filter APIs for working with Broccoli Trees. It allows to chain broccoli tree transformations in the same way that you would chain array operations.
14 lines (11 loc) • 312 B
JavaScript
// Copyright 2004-present Facebook. All Rights Reserved.
const tsc = require('typescript');
const tsConfig = require('./tsconfig.json');
module.exports = {
process(src, path) {
if (path.endsWith('.ts')) {
return tsc.transpile(src, tsConfig.compilerOptions, path, []);
}
return src;
},
};