diff --git a/example/ios/Podfile b/example/ios/Podfile index faf88bd..0f9743c 100644 --- a/example/ios/Podfile +++ b/example/ios/Podfile @@ -77,11 +77,6 @@ target 'example' do pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec' pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec' - target 'exampleTests' do - inherit! :complete - # Pods for testing - end - use_native_modules! # Enables Flipper. @@ -93,12 +88,3 @@ target 'example' do flipper_post_install(installer) end end - -target 'example-tvOS' do - # Pods for example-tvOS - - target 'example-tvOSTests' do - inherit! :search_paths - # Pods for testing - end -end diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index 6fcf6c3..fe2bf52 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -451,6 +451,6 @@ SPEC CHECKSUMS: Yoga: 9db9ff2025ad21d1ac0a8b3c85d5ac4e7c29d525 YogaKit: f782866e155069a2cca2517aafea43200b01fd5a -PODFILE CHECKSUM: 56c2537f71f3f02200d6918c542a8e89a0b422fa +PODFILE CHECKSUM: 35ce0533b627f4404f5562fe748e68c1d5b57041 COCOAPODS: 1.9.3 diff --git a/example/package.json b/example/package.json index 93d6eb3..b2fac04 100644 --- a/example/package.json +++ b/example/package.json @@ -3,7 +3,7 @@ "version": "0.0.1", "private": true, "scripts": { - "postinstall": "is-macos && pod install || true", + "postinstall": "pod-install", "android": "react-native run-android", "ios": "react-native run-ios", "start": "react-native start" @@ -15,6 +15,6 @@ }, "devDependencies": { "@types/react": "^16.9.38", - "is-macos": "^0.0.1" + "pod-install": "^0.1.9" } } diff --git a/library/package.json b/library/package.json index 506be8a..dede133 100644 --- a/library/package.json +++ b/library/package.json @@ -1,6 +1,6 @@ { "name": "react-native-dynamic", - "version": "1.0.0-rc.4", + "version": "1.0.0", "main": "./dist/index.js", "typings": "./dist/index.d.ts", "repository": "git@github.com:codemotionapps/react-native-dynamic.git", diff --git a/library/src/dynamic-style-sheet.ts b/library/src/dynamic-style-sheet.ts index 666e714..292ec4c 100644 --- a/library/src/dynamic-style-sheet.ts +++ b/library/src/dynamic-style-sheet.ts @@ -4,6 +4,12 @@ import { IndexedObject, ValueOf } from 'toolkit.ts' import { DynamicValue, useDynamicValue } from './dynamic-value' import { Mode } from './types' +declare const process: { + env: { + NODE_ENV: string + } +} + type Style = ViewStyle | TextStyle | ImageStyle type DynamicStyle = { [Key in keyof T]: T[Key] | DynamicValue } @@ -38,7 +44,7 @@ function parseStylesFor>(styles: T, mode: Mode): Norm newStyles[i] = newStyle } - if (!containsDynamicValues && __DEV__) { + if (!containsDynamicValues && process.env.NODE_ENV !== 'production') { console.warn( 'A DynamicStyleSheet was used without any DynamicValues. Consider replacing with a regular StyleSheet.', ) diff --git a/yarn.lock b/yarn.lock index 6f8c557..dde68f8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3341,6 +3341,11 @@ plugin-error@^0.1.2: arr-union "^2.0.1" extend-shallow "^1.1.2" +pod-install@^0.1.9: + version "0.1.9" + resolved "https://registry.yarnpkg.com/pod-install/-/pod-install-0.1.9.tgz#c78c4e597072a014297d9185b820339ab3154768" + integrity sha512-NBbJfeVjtGw/1ro6QJYv2aN5XuHTCzLDNlD4EWXMcG9d4hOIB7L1Ie3+ScDmZpENih9SyHO98S8h7Ismk4vxUg== + posix-character-classes@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" @@ -3423,11 +3428,6 @@ react-is@^16.12.0, react-is@^16.8.1, react-is@^16.8.4: resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== -react-native-dynamic@*: - version "0.0.0" - resolved "https://registry.yarnpkg.com/react-native-dynamic/-/react-native-dynamic-0.0.0.tgz#0b5c6ab5f1097dc108cf3538aaaecaef2654ff6b" - integrity sha512-2AwT9RR9zWH+Z/YLRnPj4j8pFikYp2+LEvZHTYgPKnm8rbNdUEndHofWkf2vfe3kG8QQi8m14ViiBTfKXvKDPQ== - react-native@0.62.0: version "0.62.0" resolved "https://registry.yarnpkg.com/react-native/-/react-native-0.62.0.tgz#166dcab76f0b5ae36a4d7046de2cbfecfdc610f1"