I have a TypeScript file with a reference; the referenced file in turn has other references. When I run the grunt-ts task, a hierarchy of subfolders is created, mirroring the reference hierarchy, and each corresponding JS file is written into a scripts
subfolder (apparently from the value of the outDir
option). How can I configure the task so all the emitted JS files end up in a single subfolder?
My configuration looks like this:
grunt.initConfig({
ts: {
default: {
src: ['**/*.ts', "!node_modules/**/*.ts"],
noImplicitAny: true,
sourceMap: true,
target: 'es3',
fast: 'always',
outDir: 'scripts'
}
}
});
I tried specifying an absolute path for outDir
with the same result.
If I don't specify outDir
, the JS from referenced TS files is emitted in the location of the TS files, which could be outside the project folder.