postinstall.js 563B

1234567891011121314151617181920212223
  1. const path = require('path')
  2. const file = require('./file')
  3. const postinstall = () => {
  4. const nodeModuleDir = path.dirname(__filename) + '/../../..'
  5. const modifies = {
  6. get reactSpec () {
  7. const avoidDupSign = '# Dependency'
  8. return [
  9. nodeModuleDir + '/react-native/React.podspec',
  10. avoidDupSign + '\n s.subspec "Dependency" do |ss|\n ss.source_files = "React/**/*.h"\n end\n\n ',
  11. 's.subspec "Core" do |ss|',
  12. avoidDupSign
  13. ]
  14. }
  15. }
  16. file.fileInsert(...modifies.reactSpec)
  17. }
  18. postinstall()