trigger.dev icon indicating copy to clipboard operation
trigger.dev copied to clipboard

feat: More flexible `dirs`property in config

Open luap2703 opened this issue 9 months ago • 0 comments

Is your feature request related to a problem? Please describe.

Currently, the dirs directory in config only support parent-level directories of task files. It would be really helpful to also target specific files (not dirs) using a glob pattern (similar to ignorePatterns). Something like...

 dirs: [ "./packages/**/task.ts"],

...is currently not supported, right?

Describe the solution you'd like to see

As we have quite a lot of packages with smaller tasks relating to some utility functions, it would be good if we could target these files by name while keeping them next to their runtime code. While storing all tasks in one parent folder is probably a great praxis, for our project structure, it would help a lot.

Describe alternate solutions

Smth like autoselecting [taskname].task.ts or [taskname].trigger.ts would also be helpful.

Additionally, a "softDirectory" flag or smth similar would also be helpful, since we also ran into some similar errors as https://github.com/triggerdotdev/trigger.dev/issues/1823 when non-task files are placed in a targeted directory.

Additional information

No response

luap2703 avatar Mar 27 '25 09:03 luap2703