Skip to content

Commit 3869c2c

Browse files
committed
Try adding examples changes
1 parent 440f81b commit 3869c2c

File tree

72 files changed

+26127
-3236
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+26127
-3236
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<packageSources>
4+
<clear />
5+
<add key="react-native" value="https://pkgs.dev.azure.com/ms/react-native/_packaging/react-native-public/nuget/v3/index.json" />
6+
<add key="Nuget.org" value="https://api.nuget.org/v3/index.json" />
7+
</packageSources>
8+
<disabledPackageSources>
9+
<clear />
10+
</disabledPackageSources>
11+
</configuration>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
const config = {};
2+
3+
module.exports = require('@rnx-kit/jest-preset')('windows', config);
Lines changed: 45 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,51 @@
1+
const {getDefaultConfig, mergeConfig} = require('@react-native/metro-config');
2+
3+
const fs = require('fs');
4+
const path = require('path');
5+
const exclusionList = require('metro-config/src/defaults/exclusionList');
6+
7+
const rnwPath = fs.realpathSync(
8+
path.resolve(require.resolve('react-native-windows/package.json'), '..'),
9+
);
10+
11+
//
12+
113
/**
2-
* Metro configuration for React Native
3-
* https://github.com/facebook/react-native
14+
* Metro configuration
15+
* https://facebook.github.io/metro/docs/configuration
416
*
5-
* @format
17+
* @type {import('metro-config').MetroConfig}
618
*/
7-
const path = require('path');
8-
const blacklist = require('metro-config/src/defaults/blacklist');
919

10-
module.exports = {
11-
resolver: {
12-
blacklistRE: blacklist([
13-
// This stops "react-native run-windows" from causing the metro server to crash if its already running
14-
new RegExp(`${path.resolve(__dirname, 'windows').replace(/[/\\]/g, '/')}.*`),
15-
// This prevents "react-native run-windows" from hitting: EBUSY: resource busy or locked, open msbuild.ProjectImports.zip
16-
/.*\.ProjectImports\.zip/,
17-
]),
18-
},
19-
transformer: {
20-
getTransformOptions: async () => ({
21-
transform: {
22-
experimentalImportSupport: false,
23-
inlineRequires: false,
24-
},
25-
}),
20+
const config = {
21+
//
22+
resolver: {
23+
extraNodeModules: {
24+
"react-native-blob-util": path.resolve(
25+
__dirname,
26+
"../../"
27+
),
2628
},
29+
blockList: exclusionList([
30+
// This stops "npx @react-native-community/cli run-windows" from causing the metro server to crash if its already running
31+
new RegExp(
32+
`${path.resolve(__dirname, 'windows').replace(/[/\\]/g, '/')}.*`,
33+
),
34+
// This prevents "npx @react-native-community/cli run-windows" from hitting: EBUSY: resource busy or locked, open msbuild.ProjectImports.zip or other files produced by msbuild
35+
new RegExp(`${rnwPath}/build/.*`),
36+
new RegExp(`${rnwPath}/target/.*`),
37+
/.*\.ProjectImports\.zip/,
38+
]),
39+
//
40+
},
41+
transformer: {
42+
getTransformOptions: async () => ({
43+
transform: {
44+
experimentalImportSupport: false,
45+
inlineRequires: true,
46+
},
47+
}),
48+
},
2749
};
50+
51+
module.exports = mergeConfig(getDefaultConfig(__dirname), config);
974 KB
Binary file not shown.

examples/ReactNativeBlobUtil/package.json

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,36 @@
77
"ios": "react-native run-ios",
88
"start": "react-native start",
99
"test": "jest",
10-
"lint": "eslint ."
10+
"lint": "eslint .",
11+
"windows": "npx @react-native-community/cli run-windows",
12+
"test:windows": "jest --config jest.config.windows.js"
1113
},
1214
"dependencies": {
1315
"react": "18.1.0",
14-
"react-native": "^0.70.3",
15-
"react-native-windows": "^0.64.0",
16-
"react-native-blob-util": "^0.17.1"
16+
"react-native": "^0.76",
17+
"react-native-blob-util": "link:../../",
18+
"react-native-windows": "^0.76"
1719
},
1820
"devDependencies": {
19-
"@babel/core": "^7.12.9",
20-
"@babel/runtime": "^7.12.5",
21-
"@react-native-community/eslint-config": "^2.0.0",
22-
"babel-jest": "^26.6.3",
23-
"eslint": "^7.32.0",
24-
"jest": "^26.6.3",
25-
"metro-react-native-babel-preset": "0.72.3",
26-
"react-test-renderer": "18.1.0"
21+
"@babel/core": "^7.12.9",
22+
"@babel/runtime": "^7.12.5",
23+
"@react-native-community/eslint-config": "^2.0.0",
24+
"babel-jest": "^26.6.3",
25+
"eslint": "^7.32.0",
26+
"jest": "^26.6.3",
27+
"metro-react-native-babel-preset": "0.72.3",
28+
"react-test-renderer": "18.1.0",
29+
"@rnx-kit/jest-preset": "^0.1.17",
30+
"@react-native/metro-config": "^0.76.9"
2731
},
2832
"jest": {
2933
"preset": "react-native"
34+
},
35+
"react-native-windows": {
36+
"init-windows": {
37+
"name": "ReactNativeBlobUtilWin",
38+
"namespace": "ReactNativeBlobUtilWin",
39+
"template": "cpp-app"
40+
}
3041
}
3142
}

examples/ReactNativeBlobUtil/windows/.gitignore

Lines changed: 1 addition & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -34,59 +34,8 @@ ipch/
3434
[Dd]ebug*/
3535
[Rr]elease*/
3636
Ankh.NoLoad
37-
38-
# Visual C++ cache files
39-
ipch/
40-
*.aps
41-
*.ncb
42-
*.opendb
43-
*.opensdf
44-
*.sdf
45-
*.cachefile
46-
*.VC.db
47-
*.VC.VC.opendb
48-
49-
#MonoDevelop
50-
*.pidb
51-
*.userprefs
52-
53-
#Tooling
54-
_ReSharper*/
55-
*.resharper
56-
[Tt]est[Rr]esult*
57-
*.sass-cache
58-
59-
#Project files
60-
[Bb]uild/
61-
62-
#Subversion files
63-
.svn
64-
65-
# Office Temp Files
66-
~$*
67-
68-
# vim Temp Files
69-
*~
70-
71-
#NuGet
72-
packages/
73-
*.nupkg
74-
75-
#ncrunch
76-
*ncrunch*
77-
*crunch*.local.xml
78-
79-
# visual studio database projects
80-
*.dbmdl
81-
82-
#Test files
83-
*.testsettings
84-
85-
#Other files
86-
*.DotSettings
8737
.vs/
88-
*project.lock.json
38+
# Visual C++ cache files
8939

9040
#Files generated by the VS build
9141
**/Generated Files/**
92-
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
4+
<PropertyGroup Label="Microsoft.ReactNative Experimental Features">
5+
<!--
6+
Required for building a New Architecture project.
7+
8+
App projects should not change this value.
9+
10+
See https://microsoft.github.io/react-native-windows/docs/new-architecture
11+
-->
12+
<RnwNewArch>true</RnwNewArch>
13+
14+
<!--
15+
Changes compilation to assume use of Microsoft.ReactNative NuGet packages
16+
instead of building the framework from source. Defaults to true.
17+
18+
This is set during app project creation and should not be changed.
19+
20+
See https://microsoft.github.io/react-native-windows/docs/nuget
21+
-->
22+
<UseExperimentalNuget>true</UseExperimentalNuget>
23+
24+
<ReactExperimentalFeaturesSet>true</ReactExperimentalFeaturesSet>
25+
</PropertyGroup>
26+
27+
</Project>
1.4 KB
Loading
7.52 KB
Loading
2.87 KB
Loading

0 commit comments

Comments
 (0)