This repository was archived by the owner on Oct 20, 2024. It is now read-only.
feat: preconditions #368
Merged
feat: preconditions #368
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.
First part for: #337,
helpful for #338, #363
This adds preconditions to svelte-add
checks
. Preconditions can be useful to determine if the environment is in a good state to apply the adder. In the future this could contain checks for checking if global tools (rust, cargo, see #338) are installed. While implementing I found out that we should be able to use this feature for detecting if the user currently has a dirtygit
repository and warn him about that (#363).Opposed to the implementation of
gatekeeping
thatsvelte-add@v1
had in place, the user should have the possibility to ignore the preconditions and install the adder if he really likes to.Sample usage:
The sample above results in the following console output:

The following things still need to be done