Skip to content

Commit

Permalink
Compile files before publishing (software-mansion#569)
Browse files Browse the repository at this point in the history
  • Loading branch information
satya164 authored May 25, 2020
1 parent 3054a15 commit 273f491
Show file tree
Hide file tree
Showing 6 changed files with 1,375 additions and 58 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,6 @@ android/app/libs
android/keystores/debug.keystore

# CocoaPods
ios/Pods/
ios/Pods/
# generated by bob
lib/
18 changes: 16 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,17 @@
"test:unit": "jest",
"format": "prettier --write --list-different './src/**/*.js'",
"lint": "eslint './src/**/*.js'",
"release": "npm login && release-it"
"release": "npm login && release-it",
"prepare": "bob build"
},
"main": "src/Animated.js",
"main": "lib/commonjs/Animated",
"module": "lib/module/Animated",
"react-native": "src/Animated",
"source": "src/Animated",
"types": "react-native-reanimated.d.ts",
"files": [
"src/",
"lib/",
"android/src/main/AndroidManifest.xml",
"android/src/main/java/",
"android/build.gradle",
Expand Down Expand Up @@ -50,6 +55,7 @@
"@babel/plugin-proposal-class-properties": "^7.7.4",
"@babel/preset-env": "^7.7.6",
"@babel/preset-typescript": "^7.7.4",
"@react-native-community/bob": "^0.14.3",
"@react-native-community/eslint-config": "^0.0.5",
"@types/react": "^16.9.0",
"@types/react-native": "0.60.19",
Expand Down Expand Up @@ -88,5 +94,13 @@
"# check if version corresponds to changes in native files \n git diff --name-only ${latestVersion} HEAD | egrep \"(android/.*)|(ios/.*)\" -q && egrep '\\.0$' -q <<< ${version}"
]
}
},
"@react-native-community/bob": {
"source": "src",
"output": "lib",
"targets": [
"commonjs",
"module"
]
}
}
31 changes: 26 additions & 5 deletions src/ReanimatedModule.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
import { NativeModules } from 'react-native';

const { ReanimatedModule } = NativeModules;

export default ReanimatedModule;
export default {
async disconnectNodeFromView() {
// noop
},
async attachEvent(viewTag, eventName, nodeID) {
// noop
},
async detachEvent(viewTag, eventName, nodeID) {
// noop
},
async createNode(nodeID, config) {
// noop
},
async dropNode(nodeID) {
// noop
},
async configureProps() {
// noop
},
async disconnectNodes() {
// noop
},
async animateNextTransition() {
console.warn('Reanimated: animateNextTransition is unimplemented on web');
},
};
5 changes: 5 additions & 0 deletions src/ReanimatedModule.native.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { NativeModules } from 'react-native';

const { ReanimatedModule } = NativeModules;

export default ReanimatedModule;
26 changes: 0 additions & 26 deletions src/ReanimatedModule.web.js

This file was deleted.

Loading

0 comments on commit 273f491

Please sign in to comment.