mirror of
https://github.com/tnypxl/rollup.git
synced 2025-12-13 06:23:18 +00:00
Compare commits
1 Commits
877a7876c0
...
feat/click
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dcf32eaeeb |
@@ -26,6 +26,14 @@ var filesCmd = &cobra.Command{
|
|||||||
Long: `The files subcommand writes the contents of all files (with target custom file types provided)
|
Long: `The files subcommand writes the contents of all files (with target custom file types provided)
|
||||||
in a given project, current path or a custom path, to a single timestamped markdown file
|
in a given project, current path or a custom path, to a single timestamped markdown file
|
||||||
whose name is <project-directory-name>-rollup-<timestamp>.md.`,
|
whose name is <project-directory-name>-rollup-<timestamp>.md.`,
|
||||||
|
PreRunE: func(cmd *cobra.Command, args []string) error {
|
||||||
|
var err error
|
||||||
|
cfg, err = config.Load("rollup.yml") // Assuming the config file is named rollup.yml
|
||||||
|
if err != nil {
|
||||||
|
return fmt.Errorf("failed to load configuration: %v", err)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
},
|
||||||
RunE: func(cmd *cobra.Command, args []string) error {
|
RunE: func(cmd *cobra.Command, args []string) error {
|
||||||
return runRollup(cfg)
|
return runRollup(cfg)
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user