Summary:
We use custom npm scripts (`prepare-release`, `cleanup-release`) to
- move `src` to `src.orig`, and `build` to `src` before creating the tarball
- move everything back afterwards
We run these scripts with lerna before and after publishing. Custom hooks avoid problems with `prepublishOnly` and `postpublish` not being run at opportune times, `prepack` and `postpack` not being supported by npm v4 and yarn, and using `lerna run prepublishOnly` resulting in duplicated execution of the command.
This ensures that development is closer to what is pulled in from npm.
Reviewed By: jeanlauliac
Differential Revision: D5310133
fbshipit-source-id: 6b9885c88b936ef3fe5f1858738ad63d581a8731