Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fix: #16
Description
This generate a file tree for stories:
About the configuration:
tree.file
title
(default) use slashes of the story title to create the pathpath
use the relative directory path of the storyfunction
a function that takes an object {title, path} and return an array of string, the last one being the file nametree.order
asc
(default) alphabetical order in each directoryfunction
a function that takes two string in argument and return a number to sort filesAdditional context
The creation of the tree require two steps:
If I used directly an array without the object step, it could have been quite slow to check if subfolder already exists (O(n²)).
Though, it might be overengineered, you tell me.
What is the purpose of this pull request?