1 | const project = (() => {
|
2 | const path = require('path');
|
3 | try {
|
4 | const { configureProjects } = require('react-native-test-app');
|
5 | return configureProjects({
|
6 | android: {
|
7 | sourceDir: path.join('example', 'android'),
|
8 | },
|
9 | ios: {
|
10 | sourceDir: 'example/ios',
|
11 | },
|
12 | windows: {
|
13 | sourceDir: path.join('example', 'windows'),
|
14 | solutionFile: path.join('example', 'windows', 'WebviewExample.sln'),
|
15 | },
|
16 | });
|
17 | } catch (e) {
|
18 | return undefined;
|
19 | }
|
20 | })();
|
21 |
|
22 | module.exports = {
|
23 | dependencies: {
|
24 |
|
25 | 'react-native-webview': {
|
26 | root: __dirname,
|
27 | },
|
28 | },
|
29 | dependency: {
|
30 | platforms: {
|
31 | windows: {
|
32 | sourceDir: 'windows',
|
33 | solutionFile: 'ReactNativeWebView.sln',
|
34 | projects: [
|
35 | {
|
36 | projectFile: 'ReactNativeWebView/ReactNativeWebView.vcxproj',
|
37 | directDependency: true,
|
38 | },
|
39 | ],
|
40 | },
|
41 | },
|
42 | },
|
43 | ...(project ? { project } : undefined),
|
44 | };
|