publish react plugin
Summary: Publishing React Dev tools plugin: - migrate to TS - move iOS and JS part to public folder (Android was already) Reviewed By: passy Differential Revision: D17164782 fbshipit-source-id: 20ccba71d807df2d33fe5348a62c6ee7f78ae8ba
This commit is contained in:
committed by
Facebook Github Bot
parent
7bb9ef4a37
commit
b7933aef2e
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
#if FB_SONARKIT_ENABLED
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#import <FlipperKit/FlipperPlugin.h>
|
||||
|
||||
@interface FlipperKitReactPlugin : NSObject<FlipperPlugin>
|
||||
|
||||
@end
|
||||
|
||||
#endif
|
||||
@@ -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.
|
||||
*/
|
||||
#if FB_SONARKIT_ENABLED
|
||||
|
||||
#import "FlipperKitReactPlugin.h"
|
||||
|
||||
#import <FlipperKit/FlipperClient.h>
|
||||
#import <FlipperKit/FlipperConnection.h>
|
||||
#import <FlipperKit/FlipperResponder.h>
|
||||
|
||||
#import "Plugins.h"
|
||||
|
||||
@implementation FlipperKitReactPlugin
|
||||
|
||||
- (NSString*)identifier {
|
||||
return @"React";
|
||||
}
|
||||
|
||||
- (void)didConnect:(id<FlipperConnection>)connection {
|
||||
[connection receive:@"config"
|
||||
withBlock:^(NSDictionary* params, id<FlipperResponder> responder){
|
||||
// set received port and host to dev tools
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)didDisconnect {
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
void FlipperKitReactPluginInit(FlipperClient *client)
|
||||
{
|
||||
[client addPlugin:[FlipperKitReactPlugin new]];
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user