mirror of
https://github.com/status-im/react-native.git
synced 2025-01-09 09:12:02 +00:00
e7521a114f
Summary: An attempt to address https://github.com/facebook/react-native/issues/9156. cc grabbou Kureev **Test plan (required)** 1. Added the following to the `package.json` of a `react-native-plugin` ``` "rnpm": { "commands": { "preunlink": "node node_modules/react-native-plugin/scripts/preunlink" "postunlink": "node node_modules/react-native-plugin/scripts/postunlink" } } ``` 2. Added files, `scripts/preunlink.js` and `scripts/postunlink.js` to the plugin. Each of them simply logs a string to the console. 3. Ran `react-native unlink react-native-plugin` to verify that those logs get printed. Closes https://github.com/facebook/react-native/pull/9157 Differential Revision: D3749434 fbshipit-source-id: 40b94c9026db4f11e8f5be4a417a0670e8069be6
3 lines
117 B
JavaScript
3 lines
117 B
JavaScript
module.exports = (func) => new Promise((resolve, reject) =>
|
|
func((err, res) => err ? reject(err) : resolve(res))
|
|
); |