@@ -122,31 +122,6 @@ let copyModules = BuildTask.create "CopyModules" [ npmInstall ] {
122122 )
123123
124124 Shell.copyDir REPL_ OUTPUT " node_modules/fable-standalone/dist" ( fun _ -> true )
125-
126- // Automatically update the version in Prelude.fs
127- let reg = Regex( @" let \[<Literal>\] FABLE_VERSION = "" (.*)"" " )
128- let fableCompilerPackageJson = CWD </> " node_modules/fable-compiler/package.json"
129- let currentVersionRegex = Regex( @" ^\s*"" version"" :\s*"" (.*)"" " )
130- let currentVersion =
131- fableCompilerPackageJson
132- |> File.ReadLines
133- |> Seq.find ( fun line ->
134- currentVersionRegex.IsMatch( line)
135- )
136- |> fun line ->
137- currentVersionRegex.Match( line). Groups.[ 1 ]. Value
138-
139- let newLines =
140- PRELUDE_ FILE
141- |> File.ReadLines
142- |> Seq.map ( fun line ->
143- reg.Replace( line, fun m ->
144- m.Groups.[ 0 ]. Value.Replace( m.Groups.[ 1 ]. Value, currentVersion)
145- )
146- )
147- |> Seq.toArray
148-
149- File.WriteAllLines( PRELUDE_ FILE, newLines)
150125}
151126
152127// TODO re-add generate metadata for REPL lib using git submobules
@@ -162,7 +137,7 @@ let updatePreludeREPLVersion = BuildTask.create "UpdateREPLVersion" [ ] {
162137 let reg = Regex( @" let \[<Literal>\] REPL_VERSION = "" (.*)"" " )
163138 let newLines =
164139 PRELUDE_ FILE
165- |> File.ReadLines
140+ |> File.ReadLines
166141 |> Seq.map ( fun line ->
167142 reg.Replace( line, fun m ->
168143 let previousVersion = m.Groups.[ 1 ]. Value
@@ -174,7 +149,7 @@ let updatePreludeREPLVersion = BuildTask.create "UpdateREPLVersion" [ ] {
174149 )
175150 |> Seq.toArray
176151
177- File.WriteAllLines( PRELUDE_ FILE, newLines)
152+ File.WriteAllLines( PRELUDE_ FILE, newLines)
178153}
179154
180155let buildLib = BuildTask.create " BuildLib" [ copyModules ] {
@@ -187,10 +162,10 @@ let buildLib = BuildTask.create "BuildLib" [ copyModules ] {
187162 for file in Directory.EnumerateFiles( CWD </> outDir, " *.js" , SearchOption.AllDirectories) do
188163 let newLines =
189164 File.ReadLines file
190- |> Seq.map ( fun line ->
165+ |> Seq.map ( fun line ->
191166 regAllImports.Replace( line, fun m ->
192- // Patch the fable-library import from the "repl libs"
193- // to make sure they use the same `fable-library` module as the code
167+ // Patch the fable-library import from the "repl libs"
168+ // to make sure they use the same `fable-library` module as the code
194169 // compiled from the REPL
195170 // This is needed in order to make reflection work
196171 // See https://github.com/fable-compiler/repl/issues/97#issuecomment-588498482
@@ -199,25 +174,25 @@ let buildLib = BuildTask.create "BuildLib" [ copyModules ] {
199174 m.Value.Replace( m.Groups.[ 1 ]. Value, " ../../fable-library" )
200175 )
201176
202- if adaptedLine.EndsWith( " .js" ) then adaptedLine else adaptedLine + " .js"
177+ if adaptedLine.EndsWith( " .js" ) then adaptedLine else adaptedLine + " .js"
203178 )
204179 )
205180 |> Seq.toArray
206181 File.WriteAllLines( file, newLines)
207182}
208183
209- let buildApp = BuildTask.create " BuildApp" [ updatePreludeREPLVersion.IfNeeded; buildLib ] {
184+ let buildApp = BuildTask.create " BuildApp" [ updatePreludeREPLVersion.IfNeeded; copyModules ] {
210185 Npm.run " build" id
211186}
212187
213- let watchApp = BuildTask.create " WatchApp" [ buildLib ] {
188+ let watchApp = BuildTask.create " WatchApp" [ copyModules ] {
214189 Npm.run " start" id
215190}
216191
217192let _release = BuildTask.create " Release" [ updatePreludeREPLVersion; buildApp ] {
218193 let token =
219194 match Environment.environVarOrDefault " GITHUB_TOKEN" " " with
220- | s when not ( String.IsNullOrWhiteSpace s) -> s
195+ | s when not ( System. String.IsNullOrWhiteSpace s) -> s
221196 | _ -> failwith " The Github token must be set in a GITHUB_TOKEN environmental variable"
222197
223198 let version = Changelog.getLastVersion()
0 commit comments