From 5b5c3436a7146d0154642f0ed4a13fad33126cc9 Mon Sep 17 00:00:00 2001 From: Paul Currit Date: Tue, 22 Nov 2016 20:46:45 -0800 Subject: [PATCH] handle platform-specific image files when running use-figwheel Platform-specific file names for images as described in the React-Native docs at http://facebook.github.io/react-native/releases/0.37/docs/images.html --- re-natal.coffee | 1 + 1 file changed, 1 insertion(+) diff --git a/re-natal.coffee b/re-natal.coffee index 6ad7cc7..38fa51a 100644 --- a/re-natal.coffee +++ b/re-natal.coffee @@ -216,6 +216,7 @@ scanImageDir = (dir) -> .filter (path) -> fs.statSync(path).isFile() .filter (path) -> removeExcludeFiles(path) .map (path) -> path.replace /@2x|@3x/i, '' + .map (path) -> path.replace new RegExp(".(android|ios)" + fpath.extname(path) + "$", "i"), fpath.extname(path) .filter (v, idx, slf) -> slf.indexOf(v) == idx dirs = fs.readdirSync(dir)