Skip to content

Commit 2b30ff2

Browse files
Use stdlib String.replaceAll
1 parent dd08d6e commit 2b30ff2

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

src/NewProject.res

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
open Node
22

33
module P = ClackPrompts
4-
module StringPrototype = {
5-
@send external replaceAll: (string, string, string) => string = "replaceAll"
6-
}
74

85
let packageNameRegExp = /^[a-z0-9-]+$/
96
let resxTemplatePlaceholderName = "resx-template"
@@ -118,7 +115,7 @@ let rec replaceFileContents = async (remainingFilePaths, ~replaceValue, ~withVal
118115
| list{} => ()
119116
| list{filePath, ...remainingFilePaths} =>
120117
let fileContents = await Fs.Promises.readFile(filePath)
121-
let updatedFileContents = fileContents->StringPrototype.replaceAll(replaceValue, withValue)
118+
let updatedFileContents = fileContents->String.replaceAll(replaceValue, withValue)
122119

123120
await Fs.Promises.writeFile(filePath, updatedFileContents)
124121
await replaceFileContents(remainingFilePaths, ~replaceValue, ~withValue)

0 commit comments

Comments
 (0)