Skip to content

Commit

Permalink
Ensure RN flavor is transpiled with babel.
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
colmbrady committed Feb 17, 2018
1 parent ecab599 commit 1277481
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion index.android.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = require('./src/android/index');
module.exports = require('./dist/android/index');
2 changes: 1 addition & 1 deletion index.ios.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = require('./src/ios/index');
module.exports = require('./dist/ios/index');
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -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');
6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -19,7 +19,6 @@
"README.md",
"./index.js",
"dist/",
"src/",
"index.ios.js",
"index.android.js"
],
Expand All @@ -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": {
Expand Down Expand Up @@ -71,4 +69,4 @@
"reactxp": "^0.42.15",
"webpack": "^3.10.0"
}
}
}

0 comments on commit 1277481

Please sign in to comment.