-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Detect v12 and make rescript core optional * Remove rescript packages from templates * Update rescript.json * Select v11 by default * Fix prompt binding * Remove switch
- Loading branch information
Showing
9 changed files
with
69 additions
and
23 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
let removeRescriptCore = (config: Dict.t<JSON.t>) => { | ||
// Remove @rescript/core from bs-dependencies if the version is not set. | ||
switch config->Dict.get("bs-dependencies") { | ||
| Some(Array(dependencies)) => { | ||
let newDependencies = dependencies->Array.filter(dependency => | ||
switch dependency { | ||
| String("@rescript/core") => false | ||
| _ => true | ||
} | ||
) | ||
config->Dict.set("bs-dependencies", Array(newDependencies)) | ||
} | ||
| _ => () | ||
} | ||
|
||
// Remove "-open RescriptCore" from bsc-flags if the version is not set. | ||
switch config->Dict.get("bsc-flags") { | ||
| Some(Array(flags)) => { | ||
let newFlags = flags->Array.filter(flag => | ||
switch flag { | ||
| String("-open RescriptCore") => false | ||
| _ => true | ||
} | ||
) | ||
config->Dict.set("bsc-flags", Array(newFlags)) | ||
} | ||
| _ => () | ||
} | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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