markdown-notes-tree
Advanced tools
Comparing version 1.6.0 to 1.7.0
{ | ||
"name": "markdown-notes-tree", | ||
"version": "1.6.0", | ||
"version": "1.7.0", | ||
"description": "Generate Markdown trees that act as a table of contents for a folder structure with Markdown notes", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -44,3 +44,3 @@ # markdown-notes-tree | ||
- Example: `markdown-notes-tree --ignore exclude-this-folder` | ||
- `--includeAllDirectoriesByDefault`: Include all directories by default (don't apply the default ignored folders listed above). It is recommended to combine this with an ignore for `node_modules`, unless you have good reasons to include that one. | ||
- `--includeAllDirectoriesByDefault`: Include all directories by default (don't apply the default ignored folders listed above). You can combine this with custom ignores as needed. | ||
- Example: `markdown-notes-tree --includeAllDirectoriesByDefault --ignore node_modules` | ||
@@ -51,2 +51,4 @@ - `--linkToSubdirectoryReadme`: When linking to a subdirectory, link directly to its `README.md` file. Note that this assumes that each subdirectory will actually have a `README.md` file. By default, the tool generates these automatically. | ||
- Example: `markdown-notes-tree --noSubdirectoryTrees` | ||
- `--notesBeforeDirectories`: If a directory contains both notes and subdirectories, put the notes before the subdirectories in he tree. By default, it's the other way around. | ||
- Example: `markdown-notes-tree --notesBeforeDirectories` | ||
- `--orderNotesByTitle`: Order notes in the same (sub)directory by title instead of by filename. | ||
@@ -53,0 +55,0 @@ - Example: `markdown-notes-tree --orderNotesByTitle` |
@@ -15,2 +15,3 @@ "use strict"; | ||
noSubdirectoryTrees: parsedArguments.noSubdirectoryTrees || false, | ||
notesBeforeDirectories: parsedArguments.notesBeforeDirectories || false, | ||
orderNotesByTitle: parsedArguments.orderNotesByTitle || false, | ||
@@ -17,0 +18,0 @@ silent: parsedArguments.silent || false, |
@@ -13,2 +13,3 @@ "use strict"; | ||
noSubdirectoryTrees: false, | ||
notesBeforeDirectories: false, | ||
orderNotesByTitle: false, | ||
@@ -15,0 +16,0 @@ silent: false, |
@@ -28,3 +28,7 @@ "use strict"; | ||
return [...treeNodesForDirectories, ...treeNodesForFiles]; | ||
if (options.notesBeforeDirectories) { | ||
return [...treeNodesForFiles, ...treeNodesForDirectories]; | ||
} else { | ||
return [...treeNodesForDirectories, ...treeNodesForFiles]; | ||
} | ||
} | ||
@@ -31,0 +35,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
31860
621
58