add omit test files and only frontend
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
// cmd/root.go
|
||||
package cmd
|
||||
|
||||
import (
|
||||
@@ -41,6 +42,9 @@ Examples:
|
||||
# Skip frontend files
|
||||
dirmd -o ./docs ~/repos/myproject --skip-frontend
|
||||
|
||||
# Omit test files and test blocks
|
||||
dirmd -o ./docs ~/repos/myproject --omit-test
|
||||
|
||||
# Generate and upload to Proton Drive
|
||||
dirmd -o ./docs ~/repos/myproject --proton-drive
|
||||
|
||||
@@ -61,6 +65,7 @@ Examples:
|
||||
drivePath string
|
||||
verticalSlices bool
|
||||
skipFrontend bool
|
||||
omitTest bool
|
||||
)
|
||||
|
||||
func Execute() {
|
||||
@@ -82,6 +87,7 @@ func init() {
|
||||
rootCmd.Flags().StringVar(&drivePath, "drive-path", "", "full remote directory on Proton Drive (e.g. /my-files/docs/api). Requires --proton-drive")
|
||||
rootCmd.Flags().BoolVar(&verticalSlices, "vertical-slices", false, "split output into root index.md + one markdown per top-level directory")
|
||||
rootCmd.Flags().BoolVar(&skipFrontend, "skip-frontend", false, "omit frontend file types (.html, .css, .js, .ts, .vue, .svelte, etc.)")
|
||||
rootCmd.Flags().BoolVar(&omitTest, "omit-test", false, "exclude test files (Go *_test.go, Java *Test.java) and strip #[cfg(test)] blocks from Rust")
|
||||
|
||||
rootCmd.MarkPersistentFlagRequired("output")
|
||||
}
|
||||
@@ -116,6 +122,7 @@ func run(cmd *cobra.Command, args []string) error {
|
||||
DrivePath: drivePath,
|
||||
VerticalSlices: verticalSlices,
|
||||
SkipFrontend: skipFrontend,
|
||||
OmitTest: omitTest,
|
||||
}
|
||||
|
||||
if singleFile != "" {
|
||||
|
||||
Reference in New Issue
Block a user