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 to contracts.
artifactDir is always set to None because currently we do not make any use of it. Issue #84 will decide its fate.
All compilerOptions are defaulted to false. Although the documentation does not mention this, I'm assuming this is what's expected.
The function that merged compilerOptions from ralph.json and alephium.config.ts is removed. If the file alephium.config.ts is available, the defaults compilerOptions (all false) from alephium.config.ts, defined or not, are used and the ones in ralph.json are overwritten.
This ensures that alephium.config.ts and its defaults are always prioritised over any configuration defined in ralph.json.
A new project containing a *.ral file will still start compilation. But when an empty alephium.config.ts is created, that *.ral file will have to be moved to the contracts directory (alephium.config.ts's default) for compilation.
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 #84 will decide its fate.All
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.