This repository was archived by the owner on Sep 26, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Allows devs to overwrite quark props to use their own functions #38
Draft
dslovinsky
wants to merge
18
commits into
main
Choose a base branch
from
customOverwrites
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
|
@dslovinsky I didnt see any use of |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes
getConfigto load the contents of user quarks.config.tsCloses #9
Other notes (things to check, explanation of implementation, etc.)
The challenge here has been loading the config in a method that a frontend framework like next supports. The problem is next seems to not like that
fsis being used withinfindup-syncsince this is a frontend project wherefsis not allowed. But it's the only way we have access to the dependent repo's config file.Relevant threads:
Why use findup-sync:
Ordinarily we could just use path.resolve to get the contents of a specific file path in the dependent project, but the difficult is that "root directory" can actually mean several different places, for example depending on if you're in a monorepo. So instead the approach is to start from a working directory then move up into ancestors looking for a file that matches the target glob. Findup sync seems good for this:
Example:
See
lib/loadConfig.tsin TailwindJITI may useful:
https://www.npmjs.com/package/jiti