grunt-ts icon indicating copy to clipboard operation
grunt-ts copied to clipboard

Grunt files.rename optional method is not being called by grunt-ts

Open darcyparker opened this issue 8 years ago • 1 comments

I want to rename the output of the files transpiled by grunt-ts. Unfortunately the rename() method being passed in the usual way is not being called:

Note: I am trying the dest: property in two locations...

serve: {
  tsconfig: true,
  dest: '.tmp',
  options: {
    files: [{
      expand: true,
      cwd: 'app',
      src: [
        'app/**/*.ts',
        '!node_modules/**',
        '!typings/**'
      ],
      dest: '.tmp',
      rename: function(dest, src) {
        var newSrc = src.substring(0, src.lastIndexOf('.ts')) + '.es6';
        // var newSrc = src.substring(0, src.lastIndexOf('.js')) + '.es6';
        // var newSrc = src + '.es6';
        return path.join(dest, newSrc);
      }
    }],
    sourceMap: true
  }
}

darcyparker avatar Jul 25 '16 17:07 darcyparker

Hi - thanks for the report. Our support for files isn't the greatest. PRs graciously appreciated.

nycdotnet avatar Jul 25 '16 19:07 nycdotnet