You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
program.discover does not work with typescript compilation outputs.
To Reproduce
Steps to reproduce the behavior:
1- Create a typescript project
2- Create a program
3- Create a directory called commands
4- Put a command into the commands directory
5- Enable command discovery via the discover option.
6- Compile the project
// Javascript or Typescript code to reproduce bugimport{Program}from"@caporal/core";import*aspathfrom"path";newProgram().discover(path.join(__dirname,"commands")).run();
Expected behavior
Command discovery should not try to require non-javascript files such as typescript declaration files.
Actual behavior
Command discovery is trying to require types such as typescript declarations.
Environment informations (please complete the following information):
OS: Mac
OS version: Catalina
Shell: zsh
Caporal version: 2.0.2
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
This needs to be scoped to include only files that contain commands, thinking more on this it can't just be JS, is there some convention that could be used? {name}.command.js?
Describe the bug
program.discover does not work with typescript compilation outputs.
To Reproduce
Steps to reproduce the behavior:
1- Create a typescript project
2- Create a program
3- Create a directory called commands
4- Put a command into the commands directory
5- Enable command discovery via the
discover
option.6- Compile the project
Expected behavior
Command discovery should not try to require non-javascript files such as typescript declaration files.
Actual behavior
Command discovery is trying to require types such as typescript declarations.
Environment informations (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: