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

feat: Move config to an external file #32

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

dvh91
Copy link
Collaborator

@dvh91 dvh91 commented Jul 11, 2020

Moved relative-deps config into an external file (relative-deps.json) and still support the old way of storing the config in package.json

Motivation is that this config is personal and should not be committed to the repo.

Resolve issue #30

README.md Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
Copy link
Owner

@mweststrate mweststrate left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thanks for doing this! Left some comments, I think the init condition isn't entirely correct yet?

(pkg.devDependencies && pkg.devDependencies["relative-deps"]) ||
(pkg.dependencies && pkg.dependencies["relative-deps"])
)) {
if (config) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this condition is not correct, the goal of this step here is to install relative-deps itself to the package if not yet present. Probably should be !config?

}

// the other file formats will require complex parsing and it's not in the scope of work.
const allowedConfigFiles = ['package.json', 'relativeDependenciesrc', 'relativeDependenciesrc.json'];
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this block (248 - 255) of loading and validation config should be a function that is used wherever config is loaded, so for example at line 15 as well?

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

Successfully merging this pull request may close these issues.

3 participants