File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -187,6 +187,7 @@ function compilerArgsFromOptions(options, emitWarning) {
187
187
case "warn" : return [ "--warn" ] ;
188
188
case "debug" : return [ "--debug" ] ;
189
189
case "docs" : return [ "--docs" , value ]
190
+ case "runtimeOptions" : return [ "+RTS" , value , "-RTS" ]
190
191
default :
191
192
if ( supportedOptions . indexOf ( opt ) === - 1 ) {
192
193
emitWarning ( 'Unknown Elm compiler option: ' + opt ) ;
@@ -206,5 +207,6 @@ module.exports = {
206
207
compileWorker : require ( "./worker.js" ) ( compile ) ,
207
208
compileToString : compileToString ,
208
209
compileToStringSync : compileToStringSync ,
209
- findAllDependencies : findAllDependencies
210
+ findAllDependencies : findAllDependencies ,
211
+ _prepareProcessArgs : prepareProcessArgs
210
212
} ;
Original file line number Diff line number Diff line change @@ -82,6 +82,19 @@ describe("#compileToString", function() {
82
82
} ) ;
83
83
} ) ;
84
84
85
+ it ( "adds runtime options as arguments" , function ( ) {
86
+ var opts = {
87
+ yes : true ,
88
+ verbose : true ,
89
+ cwd : fixturesDir ,
90
+ runtimeOptions : "-A128M -H128M -n8m"
91
+ } ;
92
+
93
+ return expect ( compiler
94
+ . _prepareProcessArgs ( "a.elm" , opts )
95
+ . join ( " " ) ) . to . equal ( "a.elm --yes +RTS -A128M -H128M -n8m -RTS" ) ;
96
+ } ) ;
97
+
85
98
it ( "reports errors on bad syntax" , function ( ) {
86
99
var opts = {
87
100
yes : true ,
You can’t perform that action at this time.
0 commit comments