Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Improvement] Better devDep heuristic #81

Open
dawsbot opened this issue Feb 11, 2017 · 4 comments
Open

[Improvement] Better devDep heuristic #81

dawsbot opened this issue Feb 11, 2017 · 4 comments

Comments

@dawsbot
Copy link

dawsbot commented Feb 11, 2017

Currently, deps are installed only when the file ends with .spec.js and .test.js. Some developers like to follow a different convention which includes a single test.js file or a /test directory where all the files are executed when tests are executed.

Would you be open to changing the heuristic currently used to determine if a file is a test file to include such conventions?

@siddharthkp
Copy link
Owner

Yes!

I've been thinking about this. What do you think about a regex that you can add to your package.json?

@dawsbot
Copy link
Author

dawsbot commented Feb 13, 2017

Adding that ability in the package.json is a good idea as an override, but as for sensible defaults, why not make a breaking change that operates on files which match **/test/** and **/test.js? I say good defaults beat customization anyday. That way people don't need to setup anything on their own unless they want more advanced filetype triggers.

@siddharthkp
Copy link
Owner

siddharthkp commented Feb 14, 2017

Do you want to take a shot at it?

@dawsbot
Copy link
Author

dawsbot commented Feb 14, 2017

I'm not going to currently, the offer is open for anyone else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants