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

add noDev option. closes #5 #6

Merged
merged 5 commits into from Mar 15, 2019

Conversation

Projects
None yet
2 participants
@juliangruber
Copy link
Member

juliangruber commented Mar 15, 2019

No description provided.

@juliangruber juliangruber requested review from Raynos and Fishrock123 Mar 15, 2019

@juliangruber juliangruber changed the title add noDev option. closes #5 add dev option. closes #5 Mar 15, 2019

@Raynos

Raynos approved these changes Mar 15, 2019

Show resolved Hide resolved example.js Outdated
index.js Outdated
@@ -124,7 +126,7 @@ const getTreeFromYarnLock = ({ yarnLock: yarnLockString, packageJSON }) => {
return tree
}

const getTreeFromNodeModules = async dir => {
const getTreeFromNodeModules = async (dir, { dev = true } = {}) => {

This comment has been minimized.

Copy link
@Raynos

Raynos Mar 15, 2019

nitpick: avoid optional options if possible.

This comment has been minimized.

Copy link
@Raynos

Raynos Mar 15, 2019

i think its fine for dev = true to be optional; but ideally all callers to getTreeFromNodeModules pass in { dev: bool } as a required argument.

Too many optional parameters leads to accidentally not passing opts.dev down to the next function call.

Show resolved Hide resolved README.md Outdated

juliangruber added some commits Mar 15, 2019

@juliangruber juliangruber changed the title add dev option. closes #5 add noDev option. closes #5 Mar 15, 2019

@Raynos

Raynos approved these changes Mar 15, 2019

@juliangruber juliangruber merged commit 09e1dfd into master Mar 15, 2019

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@juliangruber

This comment has been minimized.

Copy link
Member Author

juliangruber commented Mar 15, 2019

3.1.0

@juliangruber juliangruber deleted the julian/5-add-no-dev branch Mar 15, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.