postinstall.js 492B

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