From 040d2efd5edbfa10a136ad3b83da477d6e191aa6 Mon Sep 17 00:00:00 2001 From: CallMeTango Date: Thu, 30 Apr 2015 18:00:45 +0200 Subject: [PATCH] gruntjs: Fixed type of IExpandedFilesConfig.cwd Changed type of IExpandedFilesConfig.cwd from boolean to string. Added simple test for interface IExpandedFilesConfig as well. fixes #4207 --- gruntjs/gruntjs-tests.ts | 12 +++++++++++- gruntjs/gruntjs.d.ts | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/gruntjs/gruntjs-tests.ts b/gruntjs/gruntjs-tests.ts index 6b8607329f..55f106d535 100644 --- a/gruntjs/gruntjs-tests.ts +++ b/gruntjs/gruntjs-tests.ts @@ -68,7 +68,17 @@ exports = (grunt: IGrunt) => { asyncedTwoArgs(2, "values", (result: string) => { console.log(result); }); - var fileMaps = grunt.file.expandMapping([''], '', { ext: '.js' }); + + // tests for module grunt.file + var expandedFilesConfig: grunt.file.IExpandedFilesConfig = { + expand: true, + cwd: 'src', + src: ['**/*.ts'], + dest: 'build', + ext: '.js', + flatten: false + }; + var fileMaps = grunt.file.expandMapping([''], '', expandedFilesConfig); fileMaps.length; fileMaps[0].src.length; fileMaps[0].dest; diff --git a/gruntjs/gruntjs.d.ts b/gruntjs/gruntjs.d.ts index baea9dcfb7..850d0b2262 100644 --- a/gruntjs/gruntjs.d.ts +++ b/gruntjs/gruntjs.d.ts @@ -604,7 +604,7 @@ declare module grunt { /** * All {@link IExpandedFilesConfig.src} matches are relative to (but don't include) this path. */ - cwd?: boolean + cwd?: string /** * Replace any existing extension with this value in generated {@link IExpandedFilesConfig.dest} paths.