Prioritise default configurations from alephium.config.ts
#295
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.
Towards resolving
Default Settings
in #291.This PR ensures that when a build configuration is missing from
alephium.config.ts
, its default value mentioned in the documentation is used:sourceDir
will be defaulted tocontracts
.artifactDir
is always set toNone
because currently we do not make any use of it. Issue Implement deployment #84 will decide its fate.compilerOptions
are defaulted tofalse
. Although the documentation does not mention this, I'm assuming this is what's expected.The function that merged
compilerOptions
fromralph.json
andalephium.config.ts
is removed. If the filealephium.config.ts
is available, the defaultscompilerOptions
(allfalse
) fromalephium.config.ts
, defined or not, are used and the ones inralph.json
are overwritten.This ensures that
alephium.config.ts
and its defaults are always prioritised over any configuration defined inralph.json
.A new project containing a
*.ral
file will still start compilation. But when an emptyalephium.config.ts
is created, that*.ral
file will have to be moved to thecontracts
directory (alephium.config.ts
's default) for compilation.