Skip to content
This repository has been archived by the owner on Apr 13, 2021. It is now read-only.

Return files in subdirs from tut #102

Merged
merged 2 commits into from Apr 12, 2016
Merged

Conversation

ceedubs
Copy link
Contributor

@ceedubs ceedubs commented Mar 29, 2016

Fixes #100.

The tut command does successfully recurse into subdirectories and
compile nested files. However, the List that it returns doesn't include
files that are within subdirectories. This causes nested files to not be
picked up by sbt-site if you do something like
site.addMappingsToSiteDir(tut, "tut").

This change adds the touched nested files to the output of the command.
Since the result is no longer necessarily a flat directory, we have to
switch from using File.getName to a relative path for the file name
part of the (file, filename) tuple. I'm using toString on the relative
path which works just fine on my Mac, but I don't know if that could
cause trouble on Windows machines that might use a different path
delimiter.

Cody Allen added 2 commits March 29, 2016 08:00
Fixes tpolecat#100.

The `tut` command does successfully recurse into subdirectories and
compile nested files. However, the List that it returns doesn't include
files that are within subdirectories. This causes nested files to not be
picked up by sbt-site if you do something like
`site.addMappingsToSiteDir(tut, "tut")`.

This change adds the touched nested files to the output of the command.
Since the result is no longer necessarily a flat directory, we have to
switch from using `File.getName` to a relative path for the file name
part of the (file, filename) tuple. I'm using `toString` on the relative
path which works just fine on my Mac, but I don't know if that could
cause trouble on Windows machines that might use a different path
delimiter.
@ceedubs
Copy link
Contributor Author

ceedubs commented Apr 12, 2016

I just updated the walk test to something that fails on master but passes on this branch.

@tpolecat
Copy link
Owner

Awesome, thank you!

@tpolecat tpolecat merged commit 425c0b5 into tpolecat:master Apr 12, 2016
@ceedubs ceedubs deleted the nested-files branch April 13, 2016 00:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants