From 1277481dd1c8c7f076b54f689fe0fdff06bfbdb6 Mon Sep 17 00:00:00 2001 From: colmb Date: Sun, 18 Feb 2018 00:03:35 +1300 Subject: [PATCH] Ensure RN flavor is transpiled with babel. - change babel build to output preserved directory structure - remove depend on lottie-web as bodymovin is used directly instead - change RN ios and android files to reference dist not src. - remove "src" from distribution as its no longer needed. Issue #11 --- index.android.js | 2 +- index.ios.js | 2 +- index.js | 2 +- package.json | 6 ++---- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/index.android.js b/index.android.js index 0af6a3a..5cc9f43 100644 --- a/index.android.js +++ b/index.android.js @@ -1 +1 @@ -module.exports = require('./src/android/index'); +module.exports = require('./dist/android/index'); diff --git a/index.ios.js b/index.ios.js index 1f8ecdc..683763c 100644 --- a/index.ios.js +++ b/index.ios.js @@ -1 +1 @@ -module.exports = require('./src/ios/index'); +module.exports = require('./dist/ios/index'); diff --git a/index.js b/index.js index 32d4d13..bc5246e 100644 --- a/index.js +++ b/index.js @@ -1,2 +1,2 @@ // Export web by default. Other platforms have custom index.[platform].js files -module.exports = require('./dist/index'); +module.exports = require('./dist/web/index'); diff --git a/package.json b/package.json index 636b8e6..5728ab3 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "dev:setup": "npm i && node ./node_modules/.bin/npm-install-peers", "dev:android": "react-native run-android", "dev:ios": "react-native run-ios", - "build": "babel src/web/index.js --out-file dist/index.js", + "build": "babel src --out-dir dist --source-maps", "test": "echo \"Error: no test specified\" && exit 1", "storybook-native": "storybook start -p 7007 --haul ./.storybook/native/webpack.haul.storybook.js --platform all", "storybook-web": "start-storybook -p 6006 -c ./.storybook/web", @@ -19,7 +19,6 @@ "README.md", "./index.js", "dist/", - "src/", "index.ios.js", "index.android.js" ], @@ -32,7 +31,6 @@ "dependencies": { "bodymovin": "^4.13.0", "lottie-react-native": "^2.2.7", - "lottie-web": "^5.0.4", "prop-types": "^15.5.9" }, "peerDependencies": { @@ -71,4 +69,4 @@ "reactxp": "^0.42.15", "webpack": "^3.10.0" } -} +} \ No newline at end of file