I'm creating a grunt config to compile all my Typescript files to Javascript. I want to save all my generated Javascript files in a build folder but also keep the same folder structure.
Example:
src/controllers/myController.ts
will compile to: build/controllers/myController.js
I created a grunt config which does this exact thing but for some reasons it also generates a node_modules folder in the build directory and this takes a lot of time. My grunt config looks as followed:
module.exports = function(grunt) {
grunt.config.set('ts', {
dev: {
files: [
{
src: ['**/*.ts'],
dest: 'build/'
}
],
options: {
target: 'es5',
fast: 'watch',
comments: false,
sourceMap: false,
failOnTypeErrors: true,
flatten: false,
expand: true,
module: 'system',
moduleResolution: 'classic'
}
}
});
grunt.loadNpmTasks('grunt-ts');
};
Is there any way to disable the node_modules generation process? Because I don't think i need them and it makes the compiling process incredibly slow.