yeet
This commit is contained in:
5
node_modules/react-native/ReactCommon/config/.clang-tidy
generated
vendored
Normal file
5
node_modules/react-native/ReactCommon/config/.clang-tidy
generated
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
Checks: '>
|
||||
clang-diagnostic-*,
|
||||
'
|
||||
...
|
46
node_modules/react-native/ReactCommon/config/BUCK
generated
vendored
Normal file
46
node_modules/react-native/ReactCommon/config/BUCK
generated
vendored
Normal file
@ -0,0 +1,46 @@
|
||||
load("@fbsource//tools/build_defs:glob_defs.bzl", "subdir_glob")
|
||||
load("@fbsource//tools/build_defs:platform_defs.bzl", "ANDROID", "APPLE", "CXX")
|
||||
load("@fbsource//tools/build_defs/apple:flag_defs.bzl", "flags", "get_preprocessor_flags_for_build_mode", "get_static_library_ios_flags")
|
||||
load("@fbsource//tools/build_defs/oss:rn_defs.bzl", "get_apple_inspector_flags", "rn_xplat_cxx_library")
|
||||
|
||||
APPLE_COMPILER_FLAGS = flags.get_flag_value(
|
||||
get_static_library_ios_flags(),
|
||||
"compiler_flags",
|
||||
)
|
||||
|
||||
rn_xplat_cxx_library(
|
||||
name = "config",
|
||||
srcs = glob(["**/*.cpp"]),
|
||||
header_namespace = "",
|
||||
exported_headers = subdir_glob(
|
||||
[
|
||||
("", "**/*.h"),
|
||||
],
|
||||
prefix = "react/config",
|
||||
),
|
||||
compiler_flags = [
|
||||
"-fexceptions",
|
||||
"-frtti",
|
||||
"-std=c++14",
|
||||
"-Wall",
|
||||
],
|
||||
fbobjc_compiler_flags = APPLE_COMPILER_FLAGS,
|
||||
fbobjc_labels = ["supermodule:ios/default/public.react_native.infra"],
|
||||
fbobjc_preprocessor_flags = get_preprocessor_flags_for_build_mode() + get_apple_inspector_flags(),
|
||||
force_static = True,
|
||||
platforms = (ANDROID, APPLE, CXX),
|
||||
preprocessor_flags = [
|
||||
"-DLOG_TAG=\"ReactNative\"",
|
||||
"-DWITH_FBSYSTRACE=1",
|
||||
],
|
||||
visibility = [
|
||||
"PUBLIC",
|
||||
],
|
||||
deps = [
|
||||
"//xplat/fbsystrace:fbsystrace",
|
||||
"//xplat/folly:headers_only",
|
||||
"//xplat/folly:memory",
|
||||
"//xplat/folly:molly",
|
||||
"//xplat/third-party/glog:glog",
|
||||
],
|
||||
)
|
40
node_modules/react-native/ReactCommon/config/ReactNativeConfig.cpp
generated
vendored
Normal file
40
node_modules/react-native/ReactCommon/config/ReactNativeConfig.cpp
generated
vendored
Normal file
@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#include "ReactNativeConfig.h"
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
/**
|
||||
* ReactNative configuration as provided by the hosting app.
|
||||
* Provide a sub-class implementation to allow app specific customization.
|
||||
*/
|
||||
ReactNativeConfig::ReactNativeConfig() {}
|
||||
|
||||
ReactNativeConfig::~ReactNativeConfig() {}
|
||||
|
||||
EmptyReactNativeConfig::EmptyReactNativeConfig() {}
|
||||
|
||||
bool EmptyReactNativeConfig::getBool(const std::string ¶m) const {
|
||||
return false;
|
||||
}
|
||||
|
||||
std::string EmptyReactNativeConfig::getString(const std::string ¶m) const {
|
||||
return "";
|
||||
}
|
||||
|
||||
int64_t EmptyReactNativeConfig::getInt64(const std::string ¶m) const {
|
||||
return 0;
|
||||
}
|
||||
|
||||
double EmptyReactNativeConfig::getDouble(const std::string ¶m) const {
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
44
node_modules/react-native/ReactCommon/config/ReactNativeConfig.h
generated
vendored
Normal file
44
node_modules/react-native/ReactCommon/config/ReactNativeConfig.h
generated
vendored
Normal file
@ -0,0 +1,44 @@
|
||||
/*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
/**
|
||||
* ReactNative configuration as provided by the hosting app.
|
||||
* Provide a sub-class implementation to allow app specific customization.
|
||||
*/
|
||||
class ReactNativeConfig {
|
||||
public:
|
||||
ReactNativeConfig();
|
||||
virtual ~ReactNativeConfig();
|
||||
|
||||
virtual bool getBool(const std::string ¶m) const = 0;
|
||||
virtual std::string getString(const std::string ¶m) const = 0;
|
||||
virtual int64_t getInt64(const std::string ¶m) const = 0;
|
||||
virtual double getDouble(const std::string ¶m) const = 0;
|
||||
};
|
||||
|
||||
/**
|
||||
* Empty configuration that will always provide "falsy" values.
|
||||
*/
|
||||
class EmptyReactNativeConfig : public ReactNativeConfig {
|
||||
public:
|
||||
EmptyReactNativeConfig();
|
||||
|
||||
bool getBool(const std::string ¶m) const override;
|
||||
std::string getString(const std::string ¶m) const override;
|
||||
int64_t getInt64(const std::string ¶m) const override;
|
||||
double getDouble(const std::string ¶m) const override;
|
||||
};
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
Reference in New Issue
Block a user