Reputation: 1828
I have written below code in gruntFile.js.
typescript: {
base: {
options: {
target: 'es5',
sourceMap: true,
noImplicitAny: true
}
},
default: {
files: [
{ src: 'source/tests/**/*.ts', dest: 'build'},
{ src: 'source/scripts/**/*.ts', dest: 'build'}
]
}
},
and I am trying to run "grunt typescript" command from command line. It is showing below error.
I have tryed "grunt typescript --force" command also. but still it is not working.
still it is not create build folder and it means that task is not working properly. Thanks in advance.
EDIT:- I have change my gruntfile.js to below as suggest in answer.
typescript: {
base: {
src: ['source/tests/**/*.ts'],
dest: 'build/',
options: {
target: 'es5',
sourceMap: true,
noImplicitAny: true
}
},
}
But still I am facing same problem.
Upvotes: 2
Views: 687
Reputation: 2322
Looking at the most current documentation that I could find for grunt-typescript
, your syntax is wrong. I have a feeling that you actually want to be using grunt-ts. It's also the plugin I know of that is compatible with the syntax you've supplied.
My personal opinion: Use grunt-ts, it's been much easier to work with, and I've gone through a few iterations of trying out a bunch of tools to get to our current build environment.
Upvotes: 5