Skip to content

Commit

Permalink
Merge pull request #8 from vossenwout/feature/more-extensions-to-ignore
Browse files Browse the repository at this point in the history
Feature/more extensions to ignore
  • Loading branch information
vossenwout authored Sep 14, 2024
2 parents 27ebb2d + cfafe90 commit a22d185
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions cmd/generate.go → cmd/bundle.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ var standardPrefixesToIgnore = []string{
// ignore go.mod, go.sum, etc.
"go",
"license",
// readme
"readme",
"README",
// poetry
"pyproject.toml",
"poetry.lock",
Expand Down Expand Up @@ -67,19 +70,24 @@ var standardExtensionsToIgnore = []string{
".pdf",
".svg",
".ico",
".woff",
".woff2",
".eot",
".ttf",
".otf",
}

// generateCmd represents the generate command
var generateCmd = &cobra.Command{
Use: "generate",
Short: "Generate a textual representation of your code",
Long: `Generates a textual representation of your code starting from the directory you execute this command in.
Use: "bundle",
Short: "Bundle your project into a single file",
Long: `Bundle your project into a single file, starting from the directory you are in.
By default common configuration and setup files (ex. .vscode, .venv, package.lock) are ignored as well as non-text extensions like .jpeg, .png, .pdf.
Example usage:
crev generate
crev generate --ignore-pre=tests,readme --ignore-ext=.txt
crev generate --ignore-pre=tests,readme --include-ext=.go,.py,.js
crev bundle
crev bundle --ignore-pre=tests,readme --ignore-ext=.txt
crev bundle --ignore-pre=tests,readme --include-ext=.go,.py,.js
`,
Args: cobra.NoArgs,
Run: func(_ *cobra.Command, _ []string) {
Expand Down

0 comments on commit a22d185

Please sign in to comment.