Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explore recursively when dest is a directory #43

Closed
oadam opened this issue May 9, 2014 · 2 comments
Closed

Explore recursively when dest is a directory #43

oadam opened this issue May 9, 2014 · 2 comments

Comments

@oadam
Copy link

oadam commented May 9, 2014

Hello,
I am using grunt-newer with grunt-ts, a typescript compiler wrapper. For this plugin, the dest parameter is the directory in which the compiled files should be written.
For the moment, grunt-newer checks the mTime of this directory, which is not updated when grunt-ts is invoked and put files inside it. So grunt-ts is systematically called if the target directory happens to be older than one of the src files.
Something inside me tells me that the guilty is grunt-ts not respecting grunt's src/dest conventions, but maybe this is just a missing feature of grunt-newer.

My question is simple : would you merge a pool request that would check if dest is a directory, and if so walk it recursively to get all the mTime of the children ?

@tschaub
Copy link
Owner

tschaub commented Jan 9, 2015

Hey @oadam - apologies for the delay in responding here. I think it would be nice to come up with a solution for tasks where the dest is a directory. But given many source files and a destination directory with many files, you still need to make some decisions.

One option would be to include all source files if any one of them is newer than any of the destination files. This would work for tasks that are using multiple files to create a single (or fewer) files.

Another option would be to only include the source files that are newer than the newest destination file. This would work for tasks that have a 1:1 mapping between input and output files (but don't use Grunt's conventions for src/dest file config).

How does the TypeScript compiler behave? Would it fit one of the above options?

@tschaub
Copy link
Owner

tschaub commented Jan 9, 2015

I'm going to fold this into #67 to track grunt-ts specific issues. It may be that we can come up with a general solution for tasks configured with dest directories, but I want to consolidate all the TypeScript issues first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants