From c1a59e5a9fd9c2ab188ef5a0daaee7a160ebfb1f Mon Sep 17 00:00:00 2001 From: Vitaliy Vlasov Date: Mon, 4 Jun 2018 12:50:36 +0300 Subject: [PATCH] Fix patching of map files --- re-natal.coffee | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/re-natal.coffee b/re-natal.coffee index 2ac71f4..42c43e5 100644 --- a/re-natal.coffee +++ b/re-natal.coffee @@ -381,23 +381,12 @@ updateGitIgnore = (platforms) -> fs.appendFileSync(".gitignore", "\n# Figwheel\n#\nfigwheel_server.log") -findPackagerFileToPatch = () -> - files = [ - "node_modules/metro-bundler/src/Server/index.js", - "node_modules/metro-bundler/build/Server/index.js", - "node_modules/react-native/packager/src/Server/index.js"] - fileToPatch = files[0]; - for f in files - if fs.existsSync(f) - fileToPatch = f - fileToPatch - patchReactNativePackager = () -> installDeps() - fileToPatch = findPackagerFileToPatch() + fileToPatch = "node_modules/metro/src/Server/index.js" log "Patching file #{fileToPatch} to serve *.map files." edit fileToPatch, - [[/match.*\.map\$\/\)/m, "match(/index\\..*\\.map$/)"]] + [[/match\(\/\\.map\$\/\)/m, "match(/index\\..*\\.map$/)"]] log "If the React Native packager is running, please restart it." shimCljsNamespace = (ns) ->