Skip to content

Commit

Permalink
⚙️ Chore: Modify Generated Template
Browse files Browse the repository at this point in the history
  • Loading branch information
dominicstop committed Jun 5, 2024
1 parent c21adc1 commit f49672a
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 55 deletions.
8 changes: 4 additions & 4 deletions ios/IosModalView.mm
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#import "IosModalView.h"

#import <react/renderer/components/RNIosModalViewSpec/ComponentDescriptors.h>
#import <react/renderer/components/RNIosModalViewSpec/EventEmitters.h>
#import <react/renderer/components/RNIosModalViewSpec/Props.h>
#import <react/renderer/components/RNIosModalViewSpec/RCTComponentViewHelpers.h>
#import <react/renderer/components/RNIModalSpec/ComponentDescriptors.h>
#import <react/renderer/components/RNIModalSpec/EventEmitters.h>
#import <react/renderer/components/RNIModalSpec/Props.h>
#import <react/renderer/components/RNIModalSpec/RCTComponentViewHelpers.h>

#import "RCTFabricComponentsPlugins.h"

Expand Down
14 changes: 0 additions & 14 deletions lefthook.yml

This file was deleted.

74 changes: 38 additions & 36 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "react-native-ios-modal",
"version": "0.1.0",
"description": "TBA",
"version": "2.0.0-3",
"description": "A react-native component for displaying a modal on iOS by natively wrapping a react-native view inside a UIViewController and presenting it.",
"main": "lib/commonjs/index",
"module": "lib/module/index",
"types": "lib/typescript/src/index.d.ts",
Expand All @@ -28,11 +28,28 @@
"scripts": {
"example": "yarn workspace react-native-ios-modal-example",
"test": "jest",
"typecheck": "tsc --noEmit",
"typescript": "tsc --noEmit --project tsconfig.build.json",
"typescript-example": "cd example && tsc --noEmit --project tsconfig.json",
"typescript-all": "yarn run typescript ; yarn run typescript-example",
"lint": "eslint \"**/*.{js,ts,tsx}\"",
"clean": "del-cli android/build example/android/build example/android/app/build example/ios/build lib",
"prepare": "bob build",
"release": "release-it"
"release": "release-it --only-version",
"open:ios": "open -a \"Xcode\" example/ios",
"open:android": "open -a \"Android Studio\" example/android",
"pod-install": "cd example/ios && bundle install ; RCT_NEW_ARCH_ENABLED=1 bundle exec pod install",
"pod-install-old": "cd example/ios && pod install",
"build:ios": "xcodebuild -workspace example/ios/IosModalExample.xcworkspace -scheme IosModalExample -destination 'generic/platform=iOS'",
"build": "yarn run lint ; yarn run typescript ; yarn run bob build ; yarn run pod-install ; yarn run build:ios",
"run-release": "cd example && npx react-native run-ios --configuration Release",
"run-debug": "cd example && npx react-native run-ios --configuration Debug",
"build-and-run": "yarn run build && yarn run run-debug && yarn run run-release",
"nuke-node-modules": "rm -rfv ./node_modules ; cd example ; rm -rfv ./node_modules ; cd ../..",
"nuke-example-pods": "cd example/ios ; pod cache clean --all ; rm -rfv ./Pods ./build ; cd ../..",
"nuke-all": "yarn run nuke-node-modules ; yarn run nuke-example-pods",
"update-dep-pods": "cd example/ios ; pod update DGSwiftUtilities ComputableLayout ; pod install --repo-update ; cd ../..",
"update-dep": "yarn add react-native-ios-utilities --dev ; cd example ; yarn add react-native-ios-utilities ; cd .. ; yarn run update-dep-pods",
"update-dep-next": "yarn add react-native-ios-utilities@next --dev ; cd example ; yarn add react-native-ios-utilities@next ; cd .. ; yarn run update-dep-pods"
},
"keywords": [
"react-native",
Expand All @@ -53,64 +70,44 @@
"registry": "https://registry.npmjs.org/"
},
"devDependencies": {
"@commitlint/config-conventional": "^17.0.2",
"@evilmartians/lefthook": "^1.5.0",
"@react-native/eslint-config": "^0.73.1",
"@release-it/conventional-changelog": "^5.0.0",
"@types/jest": "^29.5.5",
"@types/react": "^18.2.44",
"commitlint": "^17.0.2",
"del-cli": "^5.1.0",
"eslint": "^8.51.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-prettier": "^5.0.1",
"jest": "^29.7.0",
"prettier": "^3.0.3",
"react": "18.2.0",
"react-native": "0.74.2",
"react-native-builder-bob": "^0.20.0",
"release-it": "^15.0.0",
"turbo": "^1.10.7",
"typescript": "^5.2.2"
"typescript": "^5.2.2",
"@dominicstop/ts-event-emitter": "^1.1.0",
"react-native-ios-utilities": "^5.0.0-0"
},
"resolutions": {
"@types/react": "^18.2.44"
},
"peerDependencies": {
"react": "*",
"react-native": "*"
"react-native": "*",
"react-native-ios-utilities": "5.0.x"
},
"workspaces": [
"example"
],
"packageManager": "yarn@3.6.1",
"jest": {
"preset": "react-native",
"modulePathIgnorePatterns": [
"<rootDir>/example/node_modules",
"<rootDir>/lib/"
]
},
"commitlint": {
"extends": [
"@commitlint/config-conventional"
]
},
"release-it": {
"git": {
"commitMessage": "chore: release ${version}",
"commitMessage": "⚙️ chore: release ${version}",
"tagName": "v${version}"
},
"npm": {
"publish": true
},
"github": {
"release": true
},
"plugins": {
"@release-it/conventional-changelog": {
"preset": "angular"
}
}
},
"eslintConfig": {
Expand All @@ -121,13 +118,14 @@
],
"rules": {
"prettier/prettier": [
"error",
"warn",
{
"quoteProps": "consistent",
"quoteProps": "as-needed",
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "es5",
"useTabs": false
"useTabs": false,
"semi": true
}
]
}
Expand All @@ -137,7 +135,7 @@
"lib/"
],
"prettier": {
"quoteProps": "consistent",
"quoteProps": "as-needed",
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "es5",
Expand All @@ -158,8 +156,12 @@
]
},
"codegenConfig": {
"name": "RNIosModalViewSpec",
"name": "RNIModalSpec",
"type": "components",
"jsSrcsDir": "src"
"jsSrcsDir": "src",
"interfaceOnly": true,
"excludedPlatforms": [
"android"
]
}
}
4 changes: 4 additions & 0 deletions react-native-ios-modal.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ Pod::Spec.new do |s|

s.source_files = "ios/**/*.{h,m,mm}"

s.dependency 'react-native-ios-utilities'
s.dependency 'DGSwiftUtilities'
s.dependency 'ComputableLayout'

# Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0.
# See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79.
if respond_to?(:install_modules_dependencies, true)
Expand Down
1 change: 0 additions & 1 deletion src/__tests__/index.test.tsx

This file was deleted.

0 comments on commit f49672a

Please sign in to comment.