fix(Windows): Load React components (#166)
This commit is contained in:
Родитель
a4e565f92e
Коммит
fcd7f95640
|
@ -11,7 +11,7 @@ Cpp11BracedListStyle: true
|
|||
IncludeBlocks: Regroup
|
||||
IncludeCategories:
|
||||
- Regex: '"pch\.h"'
|
||||
Priority: 1
|
||||
Priority: -1
|
||||
- Regex: '^<QRCodeReader'
|
||||
Priority: 4
|
||||
- Regex: '^<React'
|
||||
|
|
|
@ -10,6 +10,7 @@ clang-format-diff.py
|
|||
dist/
|
||||
example/android/build/
|
||||
local.properties
|
||||
msbuild.binlog
|
||||
node_modules/
|
||||
!test/fixtures/**/node_modules/
|
||||
package-lock.json
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
.DS_Store
|
||||
.gradle/
|
||||
.idea/
|
||||
.vs/
|
||||
Pods/
|
||||
build/
|
||||
dist/
|
||||
|
|
|
@ -19,6 +19,10 @@
|
|||
"macos": [
|
||||
"dist/assets",
|
||||
"dist/main.macos.jsbundle"
|
||||
],
|
||||
"windows": [
|
||||
"dist/assets",
|
||||
"dist/main.windows.jsbundle"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,48 @@
|
|||
/**
|
||||
* Metro configuration for React Native
|
||||
* https://github.com/facebook/react-native
|
||||
*
|
||||
* @format
|
||||
*/
|
||||
const fs = require("fs");
|
||||
const path = require("path");
|
||||
const blacklist = require("metro-config/src/defaults/blacklist");
|
||||
|
||||
const rnPath = fs.realpathSync(
|
||||
path.resolve(require.resolve("react-native/package.json"))
|
||||
);
|
||||
const rnwPath = fs.realpathSync(
|
||||
path.resolve(require.resolve("react-native-windows/package.json"))
|
||||
);
|
||||
|
||||
module.exports = {
|
||||
resolver: {
|
||||
extraNodeModules: {
|
||||
// Redirect react-native to react-native-windows
|
||||
"react-native": rnwPath,
|
||||
"react-native-windows": rnwPath,
|
||||
},
|
||||
// Include the macos platform in addition to the defaults because the fork includes macos, but doesn't declare it
|
||||
platforms: ["ios", "android", "windesktop", "windows", "web", "macos"],
|
||||
// Since there are multiple copies of react-native, we need to ensure that metro only sees one of them
|
||||
// This should go in RN 0.61 when haste is removed
|
||||
blacklistRE: blacklist([
|
||||
new RegExp(
|
||||
`${(path.resolve(rnPath) + path.sep).replace(/[/\\]/g, "/")}.*`
|
||||
),
|
||||
|
||||
// This stops "react-native run-windows" from causing the metro server to crash if its already running
|
||||
new RegExp(
|
||||
`${path.resolve(__dirname, "windows").replace(/[/\\]/g, "/")}.*`
|
||||
),
|
||||
]),
|
||||
},
|
||||
transformer: {
|
||||
getTransformOptions: async () => ({
|
||||
transform: {
|
||||
experimentalImportSupport: false,
|
||||
inlineRequires: false,
|
||||
},
|
||||
}),
|
||||
},
|
||||
};
|
|
@ -6,13 +6,16 @@
|
|||
"build:android": "mkdirp dist/res && react-native bundle --entry-file index.js --platform android --dev true --bundle-output dist/main.android.jsbundle --assets-dest dist/res --reset-cache",
|
||||
"build:ios": "mkdirp dist && react-native bundle --entry-file index.js --platform ios --dev true --bundle-output dist/main.ios.jsbundle --assets-dest dist --reset-cache",
|
||||
"build:macos": "mkdirp dist && react-native bundle --entry-file index.js --platform macos --dev true --bundle-output dist/main.macos.jsbundle --assets-dest dist --reset-cache --config=metro.config.macos.js",
|
||||
"build:windows": "mkdirp dist && react-native bundle --entry-file index.js --platform windows --dev true --bundle-output dist/main.windows.bundle --assets-dest dist --reset-cache --config=metro.config.windows.js",
|
||||
"start": "react-native start",
|
||||
"start:macos": "react-native start --config=metro.config.macos.js"
|
||||
"start:macos": "react-native start --config=metro.config.macos.js",
|
||||
"start:windows": "react-native start --config=metro.config.windows.js"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "~16.8.6 || ~16.9.0 || ~16.11.0 || ~16.13.1",
|
||||
"react-native": "^0.60.6 || ^0.61.5 || ^0.62.2 || ^0.63.2 || 1000.0.0",
|
||||
"react-native-macos": "^0.60.0 || ^0.61.0 || ^0.62.0"
|
||||
"react-native-macos": "^0.60.0 || ^0.61.0 || ^0.62.0",
|
||||
"react-native-windows": "^0.62.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.0.0",
|
||||
|
@ -20,6 +23,7 @@
|
|||
"react": "16.11.0",
|
||||
"react-native": "0.62.2",
|
||||
"react-native-macos": "0.62.1",
|
||||
"react-native-test-app": "../"
|
||||
"react-native-test-app": "../",
|
||||
"react-native-windows": "0.62.7"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,6 +2,10 @@ if (process.argv.includes("--config=metro.config.macos.js")) {
|
|||
module.exports = {
|
||||
reactNativePath: "node_modules/react-native-macos",
|
||||
};
|
||||
} else if (process.argv.includes("--config=metro.config.windows.js")) {
|
||||
module.exports = {
|
||||
reactNativePath: "node_modules/react-native-windows",
|
||||
};
|
||||
} else {
|
||||
module.exports = {
|
||||
project: {
|
||||
|
|
|
@ -622,12 +622,12 @@
|
|||
pirates "^4.0.0"
|
||||
source-map-support "^0.5.16"
|
||||
|
||||
"@babel/runtime@^7.0.0":
|
||||
version "7.8.4"
|
||||
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.8.4.tgz#d79f5a2040f7caa24d53e563aad49cbc05581308"
|
||||
integrity sha512-neAp3zt80trRVBI1x0azq6c57aNBqYZH8KhMm3TaB7wEI5Q4A2SHfBHE8w9gOhI/lrqxtEbXZgQIrHP+wvSGwQ==
|
||||
"@babel/runtime@^7.0.0", "@babel/runtime@^7.8.4":
|
||||
version "7.11.2"
|
||||
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.11.2.tgz#f549c13c754cc40b87644b9fa9f09a6a95fe0736"
|
||||
integrity sha512-TeWkU52so0mPtDcaCTxNBI/IHiz0pZgr8VEFqXFtZWpYD08ZB6FaSwVAS8MKRQAP3bYKiVjwysOJgMFY28o6Tw==
|
||||
dependencies:
|
||||
regenerator-runtime "^0.13.2"
|
||||
regenerator-runtime "^0.13.4"
|
||||
|
||||
"@babel/template@^7.0.0", "@babel/template@^7.10.4", "@babel/template@^7.8.3":
|
||||
version "7.10.4"
|
||||
|
@ -1528,10 +1528,10 @@ cli-cursor@^3.1.0:
|
|||
dependencies:
|
||||
restore-cursor "^3.1.0"
|
||||
|
||||
cli-spinners@^2.0.0:
|
||||
version "2.2.0"
|
||||
resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.2.0.tgz#e8b988d9206c692302d8ee834e7a85c0144d8f77"
|
||||
integrity sha512-tgU3fKwzYjiLEQgPMD9Jt+JjHVL9kW93FiIMX/l7rivvOD4/LL0Mf7gda3+4U2KJBloybwgj5KEoQgGRioMiKQ==
|
||||
cli-spinners@^2.0.0, cli-spinners@^2.2.0:
|
||||
version "2.4.0"
|
||||
resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.4.0.tgz#c6256db216b878cfba4720e719cec7cf72685d7f"
|
||||
integrity sha512-sJAofoarcm76ZGpuooaO0eDy8saEy+YoZBLjC4h8srt4jeBnkYeOgqxgsJQTpyt2LjI5PTfLJHSL+41Yu4fEJA==
|
||||
|
||||
cli-width@^2.0.0:
|
||||
version "2.2.0"
|
||||
|
@ -1904,7 +1904,7 @@ end-of-stream@^1.1.0:
|
|||
dependencies:
|
||||
once "^1.4.0"
|
||||
|
||||
envinfo@^7.7.2:
|
||||
envinfo@^7.5.0, envinfo@^7.7.2:
|
||||
version "7.7.3"
|
||||
resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.7.3.tgz#4b2d8622e3e7366afb8091b23ed95569ea0208cc"
|
||||
integrity sha512-46+j5QxbPWza0PB1i15nZx0xQ4I/EfQxg9J8Had3b408SV63nEtor2e+oiY63amTo9KTuh2a3XLObNwduxYwwA==
|
||||
|
@ -2335,7 +2335,7 @@ glob-parent@^5.1.0:
|
|||
dependencies:
|
||||
is-glob "^4.0.1"
|
||||
|
||||
glob@^7.1.3:
|
||||
glob@^7.0.0, glob@^7.1.1, glob@^7.1.3:
|
||||
version "7.1.6"
|
||||
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6"
|
||||
integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==
|
||||
|
@ -2598,7 +2598,7 @@ inquirer@^7.0.0:
|
|||
strip-ansi "^6.0.0"
|
||||
through "^2.3.6"
|
||||
|
||||
interpret@^1.2.0:
|
||||
interpret@^1.0.0, interpret@^1.2.0:
|
||||
version "1.4.0"
|
||||
resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.4.0.tgz#665ab8bc4da27a774a40584e812e3e0fa45b1a1e"
|
||||
integrity sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==
|
||||
|
@ -3148,6 +3148,13 @@ makeerror@1.0.x:
|
|||
dependencies:
|
||||
tmpl "1.0.x"
|
||||
|
||||
map-age-cleaner@^0.1.1:
|
||||
version "0.1.3"
|
||||
resolved "https://registry.yarnpkg.com/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz#7d583a7306434c055fe474b0f45078e6e1b4b92a"
|
||||
integrity sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==
|
||||
dependencies:
|
||||
p-defer "^1.0.0"
|
||||
|
||||
map-cache@^0.2.0, map-cache@^0.2.2:
|
||||
version "0.2.2"
|
||||
resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf"
|
||||
|
@ -3160,6 +3167,15 @@ map-visit@^1.0.0:
|
|||
dependencies:
|
||||
object-visit "^1.0.0"
|
||||
|
||||
mem@^4.3.0:
|
||||
version "4.3.0"
|
||||
resolved "https://registry.yarnpkg.com/mem/-/mem-4.3.0.tgz#461af497bc4ae09608cdb2e60eefb69bff744178"
|
||||
integrity sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==
|
||||
dependencies:
|
||||
map-age-cleaner "^0.1.1"
|
||||
mimic-fn "^2.0.0"
|
||||
p-is-promise "^2.0.0"
|
||||
|
||||
merge-stream@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-1.0.1.tgz#4041202d508a342ba00174008df0c251b8c135e1"
|
||||
|
@ -3464,7 +3480,7 @@ mimic-fn@^1.0.0:
|
|||
resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022"
|
||||
integrity sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==
|
||||
|
||||
mimic-fn@^2.1.0:
|
||||
mimic-fn@^2.0.0, mimic-fn@^2.1.0:
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b"
|
||||
integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==
|
||||
|
@ -3759,11 +3775,21 @@ os-tmpdir@^1.0.0, os-tmpdir@~1.0.2:
|
|||
resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274"
|
||||
integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=
|
||||
|
||||
p-defer@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/p-defer/-/p-defer-1.0.0.tgz#9f6eb182f6c9aa8cd743004a7d4f96b196b0fb0c"
|
||||
integrity sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=
|
||||
|
||||
p-finally@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae"
|
||||
integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=
|
||||
|
||||
p-is-promise@^2.0.0:
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/p-is-promise/-/p-is-promise-2.1.0.tgz#918cebaea248a62cf7ffab8e3bca8c5f882fc42e"
|
||||
integrity sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg==
|
||||
|
||||
p-limit@^2.0.0, p-limit@^2.2.0:
|
||||
version "2.3.0"
|
||||
resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1"
|
||||
|
@ -4083,6 +4109,25 @@ react-native-test-app@../:
|
|||
chalk "^4.1.0"
|
||||
plop "^2.6.0"
|
||||
|
||||
react-native-windows@0.62.7:
|
||||
version "0.62.7"
|
||||
resolved "https://registry.yarnpkg.com/react-native-windows/-/react-native-windows-0.62.7.tgz#f527b2a42a869b0d80af1fbb6d55051904253175"
|
||||
integrity sha512-Y46FUBSwBh3rfLD7lTlshb9P040V3ZaBpm2MrB6UziE3YnXK4NwvcdpmQd3LJZWMjUvklSJBzU1z34xTB1yETQ==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.8.4"
|
||||
cli-spinners "^2.2.0"
|
||||
create-react-class "^15.6.3"
|
||||
envinfo "^7.5.0"
|
||||
fbjs "^1.0.0"
|
||||
glob "^7.1.1"
|
||||
ora "^3.4.0"
|
||||
prop-types "^15.7.2"
|
||||
regenerator-runtime "^0.13.2"
|
||||
shelljs "^0.7.8"
|
||||
username "^5.1.0"
|
||||
uuid "^3.3.2"
|
||||
xml-parser "^1.2.1"
|
||||
|
||||
react-native@0.62.2:
|
||||
version "0.62.2"
|
||||
resolved "https://registry.yarnpkg.com/react-native/-/react-native-0.62.2.tgz#d831e11a3178705449142df19a70ac2ca16bad10"
|
||||
|
@ -4166,10 +4211,10 @@ regenerate@^1.4.0:
|
|||
resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.0.tgz#4a856ec4b56e4077c557589cae85e7a4c8869a11"
|
||||
integrity sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg==
|
||||
|
||||
regenerator-runtime@^0.13.2:
|
||||
version "0.13.3"
|
||||
resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.3.tgz#7cf6a77d8f5c6f60eb73c5fc1955b2ceb01e6bf5"
|
||||
integrity sha512-naKIZz2GQ8JWh///G7L3X6LaQUAMp2lvb1rvwwsURe/VXwD6VMfr+/1NuNw3ag8v2kY1aQ/go5SNn79O9JU7yw==
|
||||
regenerator-runtime@^0.13.2, regenerator-runtime@^0.13.4:
|
||||
version "0.13.7"
|
||||
resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz#cac2dacc8a1ea675feaabaeb8ae833898ae46f55"
|
||||
integrity sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew==
|
||||
|
||||
regenerator-transform@^0.14.0:
|
||||
version "0.14.1"
|
||||
|
@ -4495,6 +4540,15 @@ shell-quote@^1.6.1:
|
|||
resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.7.2.tgz#67a7d02c76c9da24f99d20808fcaded0e0e04be2"
|
||||
integrity sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg==
|
||||
|
||||
shelljs@^0.7.8:
|
||||
version "0.7.8"
|
||||
resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.8.tgz#decbcf874b0d1e5fb72e14b164a9683048e9acb3"
|
||||
integrity sha1-3svPh0sNHl+3LhSxZKloMEjprLM=
|
||||
dependencies:
|
||||
glob "^7.0.0"
|
||||
interpret "^1.0.0"
|
||||
rechoir "^0.6.2"
|
||||
|
||||
signal-exit@^3.0.0, signal-exit@^3.0.2:
|
||||
version "3.0.2"
|
||||
resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d"
|
||||
|
@ -4984,6 +5038,14 @@ user-home@^1.1.1:
|
|||
resolved "https://registry.yarnpkg.com/user-home/-/user-home-1.1.1.tgz#2b5be23a32b63a7c9deb8d0f28d485724a3df190"
|
||||
integrity sha1-K1viOjK2Onyd640PKNSFcko98ZA=
|
||||
|
||||
username@^5.1.0:
|
||||
version "5.1.0"
|
||||
resolved "https://registry.yarnpkg.com/username/-/username-5.1.0.tgz#a7f9325adce2d0166448cdd55d4985b1360f2508"
|
||||
integrity sha512-PCKbdWw85JsYMvmCv5GH3kXmM66rCd9m1hBEDutPNv94b/pqCMT4NtcKyeWYvLFiE8b+ha1Jdl8XAaUdPn5QTg==
|
||||
dependencies:
|
||||
execa "^1.0.0"
|
||||
mem "^4.3.0"
|
||||
|
||||
util-deprecate@~1.0.1:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"
|
||||
|
@ -5105,6 +5167,13 @@ xcode@^2.0.0:
|
|||
simple-plist "^1.0.0"
|
||||
uuid "^3.3.2"
|
||||
|
||||
xml-parser@^1.2.1:
|
||||
version "1.2.1"
|
||||
resolved "https://registry.yarnpkg.com/xml-parser/-/xml-parser-1.2.1.tgz#c31f4c34f2975db82ad013222120592736156fcd"
|
||||
integrity sha1-wx9MNPKXXbgq0BMiISBZJzYVb80=
|
||||
dependencies:
|
||||
debug "^2.2.0"
|
||||
|
||||
xmlbuilder@^9.0.7:
|
||||
version "9.0.7"
|
||||
resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-9.0.7.tgz#132ee63d2ec5565c557e20f4c22df9aca686b10d"
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
"homepage": "https://github.com/microsoft/react-native-test-app",
|
||||
"scripts": {
|
||||
"clean": "npx --quiet rimraf example/node_modules/react-native-test-app; git clean -dfqx",
|
||||
"format:c": "clang-format -i $(git ls-files '*.h' '*.m' '*.mm')",
|
||||
"format:c": "clang-format -i $(git ls-files '*.cpp' '*.h' '*.m' '*.mm')",
|
||||
"format:js": "prettier --write $(git ls-files '*.js' '*.yml')",
|
||||
"lint:js": "eslint $(git ls-files '*.js')"
|
||||
},
|
||||
|
@ -40,11 +40,15 @@
|
|||
"peerDependencies": {
|
||||
"react": "~16.8.6 || ~16.9.0 || ~16.11.0 || ~16.13.1",
|
||||
"react-native": "^0.60.6 || ^0.61.5 || ^0.62.2 || ^0.63.2 || 1000.0.0",
|
||||
"react-native-macos": "^0.60.0 || ^0.61.0 || ^0.62.0"
|
||||
"react-native-macos": "^0.60.0 || ^0.61.0 || ^0.62.0",
|
||||
"react-native-windows": "^0.62.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"react-native-macos": {
|
||||
"optional": true
|
||||
},
|
||||
"react-native-windows": {
|
||||
"optional": true
|
||||
}
|
||||
},
|
||||
"devDependencies": {
|
||||
|
@ -56,6 +60,7 @@
|
|||
"react": "16.11.0",
|
||||
"react-native": "0.62.2",
|
||||
"react-native-macos": "0.62.1",
|
||||
"react-native-windows": "0.62.7",
|
||||
"semantic-release": "^17.0.0",
|
||||
"suggestion-bot": "^1.0.0"
|
||||
},
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
[Dd]ebugPublic/
|
||||
[Rr]elease/
|
||||
[Rr]eleases/
|
||||
AppPackages/
|
||||
x64/
|
||||
x86/
|
||||
build/
|
||||
|
|
|
@ -1,11 +1,50 @@
|
|||
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.30204.135
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ReactTestApp", "ReactTestApp\ReactTestApp.vcxproj", "{B44CEAD7-FBFF-4A17-95EA-FF5434BBD79D}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ReactNative", "ReactNative", "{545EBB52-51A5-448C-A9C7-8D1E8FDD4829}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Folly", "..\node_modules\react-native-windows\Folly\Folly.vcxproj", "{A990658C-CE31-4BCC-976F-0FC6B1AF693D}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ReactCommon", "..\node_modules\react-native-windows\ReactCommon\ReactCommon.vcxproj", "{A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ReactWindowsCore", "..\node_modules\react-native-windows\ReactWindowsCore\ReactWindowsCore.vcxproj", "{11C084A3-A57C-4296-A679-CAC17B603144}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Common", "..\node_modules\react-native-windows\Common\Common.vcxproj", "{FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "JSI.Universal", "..\node_modules\react-native-windows\JSI\Universal\JSI.Universal.vcxproj", "{A62D504A-16B8-41D2-9F19-E2E86019E5E4}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Chakra", "..\node_modules\react-native-windows\Chakra\Chakra.vcxitems", "{C38970C0-5FBF-4D69-90D8-CBAC225AE895}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "JSI.Shared", "..\node_modules\react-native-windows\JSI\Shared\JSI.Shared.vcxitems", "{0CC28589-39E4-4288-B162-97B959F8B843}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Microsoft.ReactNative", "..\node_modules\react-native-windows\Microsoft.ReactNative\Microsoft.ReactNative.vcxproj", "{F7D32BD0-2749-483E-9A0D-1635EF7E3136}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Microsoft.ReactNative.Cxx", "..\node_modules\react-native-windows\Microsoft.ReactNative.Cxx\Microsoft.ReactNative.Cxx.vcxitems", "{DA8B35B3-DA00-4B02-BDE6-6A397B3FD46B}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Mso", "..\node_modules\react-native-windows\Mso\Mso.vcxitems", "{84E05BFA-CBAF-4F0D-BFB6-4CE85742A57E}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Shared", "..\node_modules\react-native-windows\Shared\Shared.vcxitems", "{2049DBE9-8D13-42C9-AE4B-413AE38FFFD0}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SharedMSBuildProjectFiles) = preSolution
|
||||
..\node_modules\react-native-windows\JSI\Shared\JSI.Shared.vcxitems*{0cc28589-39e4-4288-b162-97b959f8b843}*SharedItemsImports = 9
|
||||
..\node_modules\react-native-windows\ReactWindowsCore\ReactWindowsCore.vcxitems*{11c084a3-a57c-4296-a679-cac17b603144}*SharedItemsImports = 4
|
||||
..\node_modules\react-native-windows\Shared\Shared.vcxitems*{2049dbe9-8d13-42c9-ae4b-413ae38fffd0}*SharedItemsImports = 9
|
||||
..\node_modules\react-native-windows\Mso\Mso.vcxitems*{84e05bfa-cbaf-4f0d-bfb6-4ce85742a57e}*SharedItemsImports = 9
|
||||
..\node_modules\react-native-windows\JSI\Shared\JSI.Shared.vcxitems*{a62d504a-16b8-41d2-9f19-e2e86019e5e4}*SharedItemsImports = 4
|
||||
..\node_modules\react-native-windows\Microsoft.ReactNative.Cxx\Microsoft.ReactNative.Cxx.vcxitems*{b44cead7-fbff-4a17-95ea-ff5434bbd79d}*SharedItemsImports = 4
|
||||
..\node_modules\react-native-windows\Chakra\Chakra.vcxitems*{c38970c0-5fbf-4d69-90d8-cbac225ae895}*SharedItemsImports = 9
|
||||
..\node_modules\react-native-windows\Microsoft.ReactNative.Cxx\Microsoft.ReactNative.Cxx.vcxitems*{da8b35b3-da00-4b02-bde6-6a397b3fd46b}*SharedItemsImports = 9
|
||||
..\node_modules\react-native-windows\Chakra\Chakra.vcxitems*{f7d32bd0-2749-483e-9a0d-1635ef7e3136}*SharedItemsImports = 4
|
||||
..\node_modules\react-native-windows\JSI\Shared\JSI.Shared.vcxitems*{f7d32bd0-2749-483e-9a0d-1635ef7e3136}*SharedItemsImports = 4
|
||||
..\node_modules\react-native-windows\Microsoft.ReactNative.Cxx\Microsoft.ReactNative.Cxx.vcxitems*{f7d32bd0-2749-483e-9a0d-1635ef7e3136}*SharedItemsImports = 4
|
||||
..\node_modules\react-native-windows\Mso\Mso.vcxitems*{f7d32bd0-2749-483e-9a0d-1635ef7e3136}*SharedItemsImports = 4
|
||||
..\node_modules\react-native-windows\Shared\Shared.vcxitems*{f7d32bd0-2749-483e-9a0d-1635ef7e3136}*SharedItemsImports = 4
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|ARM = Debug|ARM
|
||||
Debug|ARM64 = Debug|ARM64
|
||||
|
@ -41,10 +80,119 @@ Global
|
|||
{B44CEAD7-FBFF-4A17-95EA-FF5434BBD79D}.Release|x86.ActiveCfg = Release|Win32
|
||||
{B44CEAD7-FBFF-4A17-95EA-FF5434BBD79D}.Release|x86.Build.0 = Release|Win32
|
||||
{B44CEAD7-FBFF-4A17-95EA-FF5434BBD79D}.Release|x86.Deploy.0 = Release|Win32
|
||||
{A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||
{A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|ARM.Build.0 = Debug|ARM
|
||||
{A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||
{A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||
{A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|x64.Build.0 = Debug|x64
|
||||
{A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|x86.Build.0 = Debug|Win32
|
||||
{A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|ARM.ActiveCfg = Release|ARM
|
||||
{A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|ARM.Build.0 = Release|ARM
|
||||
{A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||
{A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|ARM64.Build.0 = Release|ARM64
|
||||
{A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|x64.ActiveCfg = Release|x64
|
||||
{A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|x64.Build.0 = Release|x64
|
||||
{A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|x86.ActiveCfg = Release|Win32
|
||||
{A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|x86.Build.0 = Release|Win32
|
||||
{A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||
{A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|ARM.Build.0 = Debug|ARM
|
||||
{A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||
{A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||
{A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|x64.Build.0 = Debug|x64
|
||||
{A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|x86.Build.0 = Debug|Win32
|
||||
{A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|ARM.ActiveCfg = Release|ARM
|
||||
{A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|ARM.Build.0 = Release|ARM
|
||||
{A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||
{A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|ARM64.Build.0 = Release|ARM64
|
||||
{A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|x64.ActiveCfg = Release|x64
|
||||
{A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|x64.Build.0 = Release|x64
|
||||
{A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|x86.ActiveCfg = Release|Win32
|
||||
{A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|x86.Build.0 = Release|Win32
|
||||
{11C084A3-A57C-4296-A679-CAC17B603144}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||
{11C084A3-A57C-4296-A679-CAC17B603144}.Debug|ARM.Build.0 = Debug|ARM
|
||||
{11C084A3-A57C-4296-A679-CAC17B603144}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||
{11C084A3-A57C-4296-A679-CAC17B603144}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||
{11C084A3-A57C-4296-A679-CAC17B603144}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{11C084A3-A57C-4296-A679-CAC17B603144}.Debug|x64.Build.0 = Debug|x64
|
||||
{11C084A3-A57C-4296-A679-CAC17B603144}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{11C084A3-A57C-4296-A679-CAC17B603144}.Debug|x86.Build.0 = Debug|Win32
|
||||
{11C084A3-A57C-4296-A679-CAC17B603144}.Release|ARM.ActiveCfg = Release|ARM
|
||||
{11C084A3-A57C-4296-A679-CAC17B603144}.Release|ARM.Build.0 = Release|ARM
|
||||
{11C084A3-A57C-4296-A679-CAC17B603144}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||
{11C084A3-A57C-4296-A679-CAC17B603144}.Release|ARM64.Build.0 = Release|ARM64
|
||||
{11C084A3-A57C-4296-A679-CAC17B603144}.Release|x64.ActiveCfg = Release|x64
|
||||
{11C084A3-A57C-4296-A679-CAC17B603144}.Release|x64.Build.0 = Release|x64
|
||||
{11C084A3-A57C-4296-A679-CAC17B603144}.Release|x86.ActiveCfg = Release|Win32
|
||||
{11C084A3-A57C-4296-A679-CAC17B603144}.Release|x86.Build.0 = Release|Win32
|
||||
{FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||
{FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|ARM.Build.0 = Debug|ARM
|
||||
{FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||
{FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||
{FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|x64.Build.0 = Debug|x64
|
||||
{FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|x86.Build.0 = Debug|Win32
|
||||
{FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|ARM.ActiveCfg = Release|ARM
|
||||
{FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|ARM.Build.0 = Release|ARM
|
||||
{FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||
{FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|ARM64.Build.0 = Release|ARM64
|
||||
{FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|x64.ActiveCfg = Release|x64
|
||||
{FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|x64.Build.0 = Release|x64
|
||||
{FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|x86.ActiveCfg = Release|Win32
|
||||
{FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|x86.Build.0 = Release|Win32
|
||||
{A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||
{A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Debug|ARM.Build.0 = Debug|ARM
|
||||
{A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||
{A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||
{A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Debug|x64.Build.0 = Debug|x64
|
||||
{A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Debug|x86.Build.0 = Debug|Win32
|
||||
{A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Release|ARM.ActiveCfg = Release|ARM
|
||||
{A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Release|ARM.Build.0 = Release|ARM
|
||||
{A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||
{A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Release|ARM64.Build.0 = Release|ARM64
|
||||
{A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Release|x64.ActiveCfg = Release|x64
|
||||
{A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Release|x64.Build.0 = Release|x64
|
||||
{A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Release|x86.ActiveCfg = Release|Win32
|
||||
{A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Release|x86.Build.0 = Release|Win32
|
||||
{F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||
{F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|ARM.Build.0 = Debug|ARM
|
||||
{F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||
{F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||
{F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|x64.Build.0 = Debug|x64
|
||||
{F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|x86.Build.0 = Debug|Win32
|
||||
{F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|ARM.ActiveCfg = Release|ARM
|
||||
{F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|ARM.Build.0 = Release|ARM
|
||||
{F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||
{F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|ARM64.Build.0 = Release|ARM64
|
||||
{F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|x64.ActiveCfg = Release|x64
|
||||
{F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|x64.Build.0 = Release|x64
|
||||
{F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|x86.ActiveCfg = Release|Win32
|
||||
{F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|x86.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
{A990658C-CE31-4BCC-976F-0FC6B1AF693D} = {545EBB52-51A5-448C-A9C7-8D1E8FDD4829}
|
||||
{A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD} = {545EBB52-51A5-448C-A9C7-8D1E8FDD4829}
|
||||
{11C084A3-A57C-4296-A679-CAC17B603144} = {545EBB52-51A5-448C-A9C7-8D1E8FDD4829}
|
||||
{FCA38F3C-7C73-4C47-BE4E-32F77FA8538D} = {545EBB52-51A5-448C-A9C7-8D1E8FDD4829}
|
||||
{A62D504A-16B8-41D2-9F19-E2E86019E5E4} = {545EBB52-51A5-448C-A9C7-8D1E8FDD4829}
|
||||
{C38970C0-5FBF-4D69-90D8-CBAC225AE895} = {545EBB52-51A5-448C-A9C7-8D1E8FDD4829}
|
||||
{0CC28589-39E4-4288-B162-97B959F8B843} = {545EBB52-51A5-448C-A9C7-8D1E8FDD4829}
|
||||
{F7D32BD0-2749-483E-9A0D-1635EF7E3136} = {545EBB52-51A5-448C-A9C7-8D1E8FDD4829}
|
||||
{DA8B35B3-DA00-4B02-BDE6-6A397B3FD46B} = {545EBB52-51A5-448C-A9C7-8D1E8FDD4829}
|
||||
{84E05BFA-CBAF-4F0D-BFB6-4CE85742A57E} = {545EBB52-51A5-448C-A9C7-8D1E8FDD4829}
|
||||
{2049DBE9-8D13-42C9-AE4B-413AE38FFFD0} = {545EBB52-51A5-448C-A9C7-8D1E8FDD4829}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {D8B5B7FD-54B9-4FB9-81E3-AEECA3EE7D83}
|
||||
EndGlobalSection
|
||||
|
|
|
@ -4,15 +4,14 @@
|
|||
|
||||
#include "MainPage.h"
|
||||
|
||||
using namespace winrt;
|
||||
using namespace Windows::ApplicationModel;
|
||||
using namespace Windows::ApplicationModel::Activation;
|
||||
using namespace Windows::Foundation;
|
||||
using namespace Windows::UI::Xaml;
|
||||
using namespace Windows::UI::Xaml::Controls;
|
||||
using namespace Windows::UI::Xaml::Navigation;
|
||||
using namespace ReactTestApp;
|
||||
using namespace ReactTestApp::implementation;
|
||||
using winrt::ReactTestApp::implementation::App;
|
||||
using winrt::Windows::ApplicationModel::SuspendingEventArgs;
|
||||
using winrt::Windows::ApplicationModel::Activation::ApplicationExecutionState;
|
||||
using winrt::Windows::ApplicationModel::Activation::LaunchActivatedEventArgs;
|
||||
using winrt::Windows::UI::Xaml::UnhandledExceptionEventArgs;
|
||||
using winrt::Windows::UI::Xaml::Window;
|
||||
using winrt::Windows::UI::Xaml::Controls::Frame;
|
||||
using winrt::Windows::UI::Xaml::Navigation::NavigationFailedEventArgs;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes the singleton application object. This is the first line of authored code
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<Application
|
||||
<Application
|
||||
x:Class="ReactTestApp.App"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
|
|
|
@ -6,13 +6,9 @@
|
|||
|
||||
namespace winrt::ReactTestApp::implementation
|
||||
{
|
||||
ComponentViewModel::ComponentViewModel(hstring const &name)
|
||||
ComponentViewModel::ComponentViewModel(hstring const &appKey, hstring const &displayName)
|
||||
{
|
||||
m_name = name;
|
||||
}
|
||||
|
||||
hstring ComponentViewModel::Name()
|
||||
{
|
||||
return m_name;
|
||||
appKey_ = appKey;
|
||||
displayName_ = displayName;
|
||||
}
|
||||
} // namespace winrt::ReactTestApp::implementation
|
||||
|
|
|
@ -5,11 +5,20 @@
|
|||
namespace winrt::ReactTestApp::implementation
|
||||
{
|
||||
struct ComponentViewModel : ComponentViewModelT<ComponentViewModel> {
|
||||
ComponentViewModel(hstring const &name);
|
||||
ComponentViewModel(hstring const &appKey, hstring const &displayName);
|
||||
|
||||
hstring Name();
|
||||
auto AppKey()
|
||||
{
|
||||
return appKey_;
|
||||
}
|
||||
|
||||
auto DisplayName()
|
||||
{
|
||||
return displayName_;
|
||||
}
|
||||
|
||||
private:
|
||||
hstring m_name;
|
||||
hstring appKey_;
|
||||
hstring displayName_;
|
||||
};
|
||||
} // namespace winrt::ReactTestApp::implementation
|
||||
|
|
|
@ -2,7 +2,12 @@ namespace ReactTestApp
|
|||
{
|
||||
runtimeclass ComponentViewModel
|
||||
{
|
||||
String Name
|
||||
String AppKey
|
||||
{
|
||||
get;
|
||||
};
|
||||
|
||||
String DisplayName
|
||||
{
|
||||
get;
|
||||
};
|
||||
|
|
|
@ -6,27 +6,74 @@
|
|||
#include "MainPage.g.cpp"
|
||||
#include "Manifest.h"
|
||||
|
||||
using winrt::Windows::Foundation::Collections::IVector;
|
||||
using winrt::Windows::Foundation::IAsyncAction;
|
||||
using winrt::Windows::UI::Xaml::RoutedEventArgs;
|
||||
using winrt::Windows::UI::Xaml::Controls::MenuFlyout;
|
||||
using winrt::Windows::UI::Xaml::Controls::MenuFlyoutItem;
|
||||
using winrt::Windows::UI::Xaml::Navigation::NavigationEventArgs;
|
||||
|
||||
namespace winrt::ReactTestApp::implementation
|
||||
{
|
||||
MainPage::MainPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
IVector<ReactTestApp::ComponentViewModel> MainPage::Components()
|
||||
{
|
||||
IVector<ReactTestApp::ComponentViewModel> components =
|
||||
winrt::single_threaded_observable_vector<ReactTestApp::ComponentViewModel>();
|
||||
auto menuItems = MenuFlyout().Items();
|
||||
std::optional<::ReactTestApp::Manifest> manifest = ::ReactTestApp::GetManifest();
|
||||
if (!manifest.has_value()) {
|
||||
MenuFlyoutItem newMenuItem;
|
||||
newMenuItem.Text(L"Couldn't parse app.json");
|
||||
newMenuItem.IsEnabled(false);
|
||||
menuItems.Append(newMenuItem);
|
||||
} else {
|
||||
auto &components = manifest.value().components;
|
||||
for (auto &&c : components) {
|
||||
hstring componentDisplayName = to_hstring(c.displayName.value_or(c.appKey));
|
||||
hstring appKey = to_hstring(c.appKey);
|
||||
ReactTestApp::ComponentViewModel newComponent =
|
||||
winrt::make<ComponentViewModel>(appKey, componentDisplayName);
|
||||
|
||||
for (auto &&c : ::ReactTestApp::GetManifest().components) {
|
||||
hstring componentName = to_hstring(c.displayName.value_or(c.appKey));
|
||||
ReactTestApp::ComponentViewModel newComponent =
|
||||
winrt::make<ComponentViewModel>(componentName);
|
||||
components.Append(newComponent);
|
||||
MenuFlyoutItem newMenuItem;
|
||||
newMenuItem.CommandParameter(newComponent);
|
||||
newMenuItem.Text(newComponent.DisplayName());
|
||||
newMenuItem.Click({this, &MainPage::SetReactComponentName});
|
||||
menuItems.Append(newMenuItem);
|
||||
}
|
||||
|
||||
// If only one component is present load it automatically
|
||||
if (components.size() == 1) {
|
||||
ReactRootView().ComponentName(to_hstring(components.at(0).appKey));
|
||||
}
|
||||
|
||||
ReactRootView().ReactNativeHost(reactInstance_.ReactHost());
|
||||
}
|
||||
|
||||
return components;
|
||||
}
|
||||
|
||||
IAsyncAction MainPage::OnNavigatedTo(NavigationEventArgs const &e)
|
||||
{
|
||||
Base::OnNavigatedTo(e);
|
||||
bool devServerIsRunning = co_await ::ReactTestApp::IsDevServerRunning();
|
||||
if (devServerIsRunning) {
|
||||
reactInstance_.LoadJSBundleFrom(::ReactTestApp::JSBundleSource::DevServer);
|
||||
} else {
|
||||
reactInstance_.LoadJSBundleFrom(::ReactTestApp::JSBundleSource::Embedded);
|
||||
}
|
||||
}
|
||||
|
||||
void MainPage::LoadFromJSBundle(IInspectable const &, RoutedEventArgs)
|
||||
{
|
||||
reactInstance_.LoadJSBundleFrom(::ReactTestApp::JSBundleSource::Embedded);
|
||||
}
|
||||
|
||||
void MainPage::LoadFromDevServer(IInspectable const &, RoutedEventArgs)
|
||||
{
|
||||
reactInstance_.LoadJSBundleFrom(::ReactTestApp::JSBundleSource::DevServer);
|
||||
}
|
||||
|
||||
void MainPage::SetReactComponentName(IInspectable const &sender, RoutedEventArgs)
|
||||
{
|
||||
auto s = sender.as<MenuFlyoutItem>().CommandParameter();
|
||||
ReactRootView().ComponentName(s.as<ComponentViewModel>()->AppKey());
|
||||
}
|
||||
|
||||
} // namespace winrt::ReactTestApp::implementation
|
||||
|
|
|
@ -1,17 +1,26 @@
|
|||
#pragma once
|
||||
|
||||
#include "MainPage.g.h"
|
||||
#include "ReactInstance.h"
|
||||
|
||||
namespace winrt::ReactTestApp::implementation
|
||||
{
|
||||
struct MainPage : MainPageT<MainPage> {
|
||||
public:
|
||||
MainPage();
|
||||
|
||||
Windows::Foundation::Collections::IVector<ReactTestApp::ComponentViewModel> Components();
|
||||
void LoadFromJSBundle(Windows::Foundation::IInspectable const &,
|
||||
Windows::UI::Xaml::RoutedEventArgs);
|
||||
void LoadFromDevServer(Windows::Foundation::IInspectable const &,
|
||||
Windows::UI::Xaml::RoutedEventArgs);
|
||||
Windows::Foundation::IAsyncAction
|
||||
OnNavigatedTo(Windows::UI::Xaml::Navigation::NavigationEventArgs const &e);
|
||||
using Base = MainPageT;
|
||||
|
||||
private:
|
||||
Windows::Foundation::Collections::IVector<ReactTestApp::ComponentViewModel> m_components;
|
||||
::ReactTestApp::ReactInstance reactInstance_;
|
||||
|
||||
void SetReactComponentName(Windows::Foundation::IInspectable const &,
|
||||
Windows::UI::Xaml::RoutedEventArgs e);
|
||||
};
|
||||
} // namespace winrt::ReactTestApp::implementation
|
||||
|
||||
|
|
|
@ -5,10 +5,5 @@ namespace ReactTestApp
|
|||
[default_interface] runtimeclass MainPage : Windows.UI.Xaml.Controls.Page
|
||||
{
|
||||
MainPage();
|
||||
|
||||
Windows.Foundation.Collections.IVector<ComponentViewModel> Components
|
||||
{
|
||||
get;
|
||||
};
|
||||
}
|
||||
} // namespace ReactTestApp
|
||||
|
|
|
@ -5,27 +5,24 @@
|
|||
xmlns:local="using:ReactTestApp"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
mc:Ignorable="d">
|
||||
mc:Ignorable="d"
|
||||
xmlns:react="using:Microsoft.ReactNative">
|
||||
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<MenuBar VerticalAlignment="Top" Grid.Row="0">
|
||||
<MenuBarItem Title="React">
|
||||
<MenuFlyoutItem Text="Load from JS bundle"/>
|
||||
<MenuFlyoutItem Text="Load from dev server"/>
|
||||
<MenuBarItem Title="React" x:Name="MenuFlyout">
|
||||
<MenuFlyoutItem Text="Load from JS bundle" Click="LoadFromJSBundle"/>
|
||||
<MenuFlyoutItem Text="Load from dev server" Click="LoadFromDevServer"/>
|
||||
<MenuFlyoutSeparator/>
|
||||
</MenuBarItem>
|
||||
</MenuBar>
|
||||
|
||||
<ListView ItemsSource="{x:Bind Components}" Grid.Row="1">
|
||||
<ListView.ItemTemplate>
|
||||
<DataTemplate x:DataType="local:ComponentViewModel">
|
||||
<TextBlock Text="{x:Bind Name}"/>
|
||||
</DataTemplate>
|
||||
</ListView.ItemTemplate>
|
||||
</ListView>
|
||||
<react:ReactRootView x:Name="ReactRootView" Grid.Row="1"/>
|
||||
|
||||
</Grid>
|
||||
</Page>
|
||||
|
|
|
@ -38,11 +38,14 @@ namespace ReactTestApp
|
|||
m.components = j.at("components").get<std::vector<Component>>();
|
||||
}
|
||||
|
||||
Manifest GetManifest()
|
||||
std::optional<Manifest> GetManifest()
|
||||
{
|
||||
std::ifstream manifestFile("app.json");
|
||||
nlohmann::json j;
|
||||
manifestFile >> j;
|
||||
nlohmann::json j = nlohmann::json::parse(manifestFile, nullptr, false);
|
||||
if (j.is_discarded()) {
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
Manifest m = j.get<Manifest>();
|
||||
return m;
|
||||
}
|
||||
|
|
|
@ -19,6 +19,6 @@ namespace ReactTestApp
|
|||
std::vector<Component> components;
|
||||
};
|
||||
|
||||
Manifest GetManifest();
|
||||
std::optional<Manifest> GetManifest();
|
||||
|
||||
} // namespace ReactTestApp
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" IgnorableNamespaces="uap mp">
|
||||
<Identity
|
||||
Name="40411fc5-8e92-4d46-b68d-b62df44b1366"
|
||||
|
@ -29,4 +29,4 @@
|
|||
<Capabilities>
|
||||
<Capability Name="internetClient" />
|
||||
</Capabilities>
|
||||
</Package>
|
||||
</Package>
|
||||
|
|
|
@ -3,14 +3,14 @@
|
|||
<ImportGroup Label="PropertySheets" />
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<!--
|
||||
To customize common C++/WinRT project properties:
|
||||
To customize common C++/WinRT project properties:
|
||||
* right-click the project node
|
||||
* expand the Common Properties item
|
||||
* select the C++/WinRT property page
|
||||
|
||||
For more advanced scenarios, and complete documentation, please see:
|
||||
https://github.com/Microsoft/cppwinrt/tree/master/nuget
|
||||
https://github.com/Microsoft/cppwinrt/tree/master/nuget
|
||||
-->
|
||||
<PropertyGroup />
|
||||
<ItemDefinitionGroup />
|
||||
</Project>
|
||||
</Project>
|
||||
|
|
|
@ -0,0 +1,67 @@
|
|||
#include "pch.h"
|
||||
|
||||
#include "ReactInstance.h"
|
||||
|
||||
#include <filesystem>
|
||||
|
||||
#include <winrt/Windows.Web.Http.Headers.h>
|
||||
|
||||
using winrt::Windows::Foundation::IAsyncOperation;
|
||||
using winrt::Windows::Foundation::Uri;
|
||||
using winrt::Windows::Web::Http::HttpClient;
|
||||
|
||||
namespace ReactTestApp
|
||||
{
|
||||
void ReactInstance::LoadJSBundleFrom(JSBundleSource source)
|
||||
{
|
||||
auto instanceSettings = reactNativeHost_.InstanceSettings();
|
||||
instanceSettings.UseLiveReload(source == JSBundleSource::DevServer);
|
||||
instanceSettings.UseWebDebugger(source == JSBundleSource::DevServer);
|
||||
instanceSettings.UseFastRefresh(source == JSBundleSource::DevServer);
|
||||
|
||||
switch (source) {
|
||||
case JSBundleSource::DevServer:
|
||||
instanceSettings.JavaScriptMainModuleName(L"index");
|
||||
instanceSettings.JavaScriptBundleFile(L"");
|
||||
break;
|
||||
case JSBundleSource::Embedded:
|
||||
winrt::hstring bundleFileName = winrt::to_hstring(GetBundleName());
|
||||
instanceSettings.JavaScriptBundleFile(bundleFileName);
|
||||
break;
|
||||
}
|
||||
|
||||
reactNativeHost_.ReloadInstance();
|
||||
}
|
||||
|
||||
std::string GetBundleName()
|
||||
{
|
||||
std::vector entryFileNames = {"index.windows",
|
||||
"main.windows",
|
||||
"index.native",
|
||||
"main.native",
|
||||
"index"
|
||||
"main"};
|
||||
|
||||
for (std::string &&n : entryFileNames) {
|
||||
std::string path = "Bundle\\" + n + ".bundle";
|
||||
if (std::filesystem::exists(path)) {
|
||||
return n;
|
||||
}
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
IAsyncOperation<bool> IsDevServerRunning()
|
||||
{
|
||||
Uri uri(L"http://localhost:8081/status");
|
||||
HttpClient httpClient;
|
||||
try {
|
||||
auto r = co_await httpClient.GetAsync(uri);
|
||||
co_return r.IsSuccessStatusCode();
|
||||
} catch (winrt::hresult_error &) {
|
||||
co_return false;
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace ReactTestApp
|
|
@ -0,0 +1,32 @@
|
|||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
#include <winrt/Microsoft.ReactNative.h>
|
||||
#include <winrt/Windows.Foundation.h>
|
||||
|
||||
namespace ReactTestApp
|
||||
{
|
||||
enum class JSBundleSource {
|
||||
DevServer,
|
||||
Embedded,
|
||||
};
|
||||
|
||||
class ReactInstance
|
||||
{
|
||||
public:
|
||||
auto &ReactHost()
|
||||
{
|
||||
return reactNativeHost_;
|
||||
}
|
||||
|
||||
void LoadJSBundleFrom(JSBundleSource source);
|
||||
|
||||
private:
|
||||
winrt::Microsoft::ReactNative::ReactNativeHost reactNativeHost_;
|
||||
};
|
||||
|
||||
std::string GetBundleName();
|
||||
winrt::Windows::Foundation::IAsyncOperation<bool> IsDevServerRunning();
|
||||
|
||||
} // namespace ReactTestApp
|
|
@ -58,6 +58,8 @@
|
|||
<PlatformToolset Condition="'$(VisualStudioVersion)' == '15.0'">v141</PlatformToolset>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' == '16.0'">v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<BundleContentRoot>..\..\example\dist</BundleContentRoot>
|
||||
<BundleContent>$(BundleContentRoot)\**\*</BundleContent>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
|
@ -71,6 +73,9 @@
|
|||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
<Import Project="..\..\node_modules\react-native-windows\Microsoft.ReactNative.Cxx\Microsoft.ReactNative.Cxx.vcxitems" Label="Shared" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
|
@ -91,9 +96,6 @@
|
|||
</DisableSpecificWarnings>
|
||||
<PreprocessorDefinitions>WIN32_LEAN_AND_MEAN;WINRT_LEAN_AND_MEAN;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateWindowsMetadata>false</GenerateWindowsMetadata>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
|
||||
<ClCompile>
|
||||
|
@ -112,10 +114,6 @@
|
|||
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</TreatWarningAsError>
|
||||
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="ComponentViewModel.h" />
|
||||
|
@ -127,6 +125,7 @@
|
|||
<ClInclude Include="MainPage.h">
|
||||
<DependentUpon>MainPage.xaml</DependentUpon>
|
||||
</ClInclude>
|
||||
<ClInclude Include="ReactInstance.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ApplicationDefinition Include="App.xaml">
|
||||
|
@ -164,6 +163,7 @@
|
|||
</ClCompile>
|
||||
<ClCompile Include="$(GeneratedFilesDir)module.g.cpp" />
|
||||
<ClCompile Include="Manifest.cpp" />
|
||||
<ClCompile Include="ReactInstance.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Midl Include="App.idl">
|
||||
|
@ -178,6 +178,19 @@
|
|||
<None Include="packages.config" />
|
||||
<None Include="PropertySheet.props" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleContentToBePackaged Include="$(BundleContent)" />
|
||||
<None Include="@(BundleContentToBePackaged)">
|
||||
<Link>$([MSBuild]::MakeRelative($(ProjectDir),'Bundle\%(RecursiveDir)%(Filename)%(Extension)'))</Link>
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\node_modules\react-native-windows\Microsoft.ReactNative\Microsoft.ReactNative.vcxproj">
|
||||
<Project>{f7d32bd0-2749-483e-9a0d-1635ef7e3136}</Project>
|
||||
<Private>false</Private>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
<Import Project="..\packages\nlohmann.json.3.7.3\build\native\nlohmann.json.targets" Condition="Exists('..\packages\nlohmann.json.3.7.3\build\native\nlohmann.json.targets')" />
|
||||
|
@ -191,4 +204,4 @@
|
|||
<Error Condition="!Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.200630.5\build\native\Microsoft.Windows.CppWinRT.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Windows.CppWinRT.2.0.200630.5\build\native\Microsoft.Windows.CppWinRT.props'))" />
|
||||
<Error Condition="!Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.200630.5\build\native\Microsoft.Windows.CppWinRT.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Windows.CppWinRT.2.0.200630.5\build\native\Microsoft.Windows.CppWinRT.targets'))" />
|
||||
</Target>
|
||||
</Project>
|
||||
</Project>
|
||||
|
|
|
@ -1,65 +1,68 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<ApplicationDefinition Include="App.xaml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Page Include="MainPage.xaml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Midl Include="App.idl" />
|
||||
<Midl Include="MainPage.idl" />
|
||||
<Midl Include="ComponentViewModel.idl" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="pch.cpp" />
|
||||
<ClCompile Include="App.cpp" />
|
||||
<ClCompile Include="MainPage.cpp" />
|
||||
<ClCompile Include="$(GeneratedFilesDir)module.g.cpp" />
|
||||
<ClCompile Include="Manifest.cpp" />
|
||||
<ClCompile Include="ComponentViewModel.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="pch.h" />
|
||||
<ClInclude Include="Manifest.h" />
|
||||
<ClInclude Include="ComponentViewModel.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="Assets\Wide310x150Logo.scale-200.png">
|
||||
<Filter>Assets</Filter>
|
||||
</Image>
|
||||
<Image Include="Assets\StoreLogo.png">
|
||||
<Filter>Assets</Filter>
|
||||
</Image>
|
||||
<Image Include="Assets\Square150x150Logo.scale-200.png">
|
||||
<Filter>Assets</Filter>
|
||||
</Image>
|
||||
<Image Include="Assets\Square44x44Logo.targetsize-24_altform-unplated.png">
|
||||
<Filter>Assets</Filter>
|
||||
</Image>
|
||||
<Image Include="Assets\Square44x44Logo.scale-200.png">
|
||||
<Filter>Assets</Filter>
|
||||
</Image>
|
||||
<Image Include="Assets\SplashScreen.scale-200.png">
|
||||
<Filter>Assets</Filter>
|
||||
</Image>
|
||||
<Image Include="Assets\LockScreenLogo.scale-200.png">
|
||||
<Filter>Assets</Filter>
|
||||
</Image>
|
||||
<Text Include="..\..\example\app.json">
|
||||
<Filter>Assets</Filter>
|
||||
</Text>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<AppxManifest Include="Package.appxmanifest" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Filter Include="Assets">
|
||||
<UniqueIdentifier>{e48dc53e-40b1-40cb-970a-f89935452892}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="PropertySheet.props" />
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ApplicationDefinition Include="App.xaml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Page Include="MainPage.xaml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Midl Include="App.idl" />
|
||||
<Midl Include="MainPage.idl" />
|
||||
<Midl Include="ComponentViewModel.idl" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="pch.cpp" />
|
||||
<ClCompile Include="App.cpp" />
|
||||
<ClCompile Include="MainPage.cpp" />
|
||||
<ClCompile Include="$(GeneratedFilesDir)module.g.cpp" />
|
||||
<ClCompile Include="Manifest.cpp" />
|
||||
<ClCompile Include="ComponentViewModel.cpp" />
|
||||
<ClCompile Include="ReactInstance.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="pch.h" />
|
||||
<ClInclude Include="Manifest.h" />
|
||||
<ClInclude Include="ComponentViewModel.h" />
|
||||
<ClInclude Include="ReactInstance.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="Assets\Wide310x150Logo.scale-200.png">
|
||||
<Filter>Assets</Filter>
|
||||
</Image>
|
||||
<Image Include="Assets\StoreLogo.png">
|
||||
<Filter>Assets</Filter>
|
||||
</Image>
|
||||
<Image Include="Assets\Square150x150Logo.scale-200.png">
|
||||
<Filter>Assets</Filter>
|
||||
</Image>
|
||||
<Image Include="Assets\Square44x44Logo.targetsize-24_altform-unplated.png">
|
||||
<Filter>Assets</Filter>
|
||||
</Image>
|
||||
<Image Include="Assets\Square44x44Logo.scale-200.png">
|
||||
<Filter>Assets</Filter>
|
||||
</Image>
|
||||
<Image Include="Assets\SplashScreen.scale-200.png">
|
||||
<Filter>Assets</Filter>
|
||||
</Image>
|
||||
<Image Include="Assets\LockScreenLogo.scale-200.png">
|
||||
<Filter>Assets</Filter>
|
||||
</Image>
|
||||
<Text Include="..\..\example\app.json">
|
||||
<Filter>Assets</Filter>
|
||||
</Text>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<AppxManifest Include="Package.appxmanifest" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Filter Include="Assets">
|
||||
<UniqueIdentifier>{e48dc53e-40b1-40cb-970a-f89935452892}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Bundle"/>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="PropertySheet.props" />
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Microsoft.Windows.CppWinRT" version="2.0.200630.5" targetFramework="native" />
|
||||
<package id="nlohmann.json" version="3.7.3" targetFramework="native" />
|
||||
<package id="Microsoft.UI.Xaml" version="2.3.191129002" targetFramework="native" />
|
||||
<package id="Microsoft.Windows.CppWinRT" version="2.0.200630.5" targetFramework="native" />
|
||||
<package id="nlohmann.json" version="3.7.3" targetFramework="native" />
|
||||
</packages>
|
||||
|
|
|
@ -1 +1 @@
|
|||
#include "pch.h"
|
||||
#include "pch.h"
|
||||
|
|
|
@ -1,15 +1,19 @@
|
|||
#pragma once
|
||||
#include <windows.h>
|
||||
#include <unknwn.h>
|
||||
#include <restrictederrorinfo.h>
|
||||
#pragma once
|
||||
|
||||
#include <hstring.h>
|
||||
#include <winrt/Windows.Foundation.h>
|
||||
#include <winrt/Windows.Foundation.Collections.h>
|
||||
#include <restrictederrorinfo.h>
|
||||
#include <unknwn.h>
|
||||
#include <windows.h>
|
||||
|
||||
#include <winrt/Microsoft.ReactNative.h>
|
||||
#include <winrt/Windows.ApplicationModel.Activation.h>
|
||||
#include <winrt/Windows.UI.Xaml.h>
|
||||
#include <winrt/Windows.UI.Xaml.Controls.h>
|
||||
#include <winrt/Windows.Foundation.Collections.h>
|
||||
#include <winrt/Windows.Foundation.h>
|
||||
#include <winrt/Windows.UI.Core.h>
|
||||
#include <winrt/Windows.UI.Xaml.Controls.Primitives.h>
|
||||
#include <winrt/Windows.UI.Xaml.Controls.h>
|
||||
#include <winrt/Windows.UI.Xaml.Data.h>
|
||||
#include <winrt/Windows.UI.Xaml.Interop.h>
|
||||
#include <winrt/Windows.UI.Xaml.Markup.h>
|
||||
#include <winrt/Windows.UI.Xaml.Navigation.h>
|
||||
#include <winrt/Windows.UI.Xaml.h>
|
||||
|
|
55
yarn.lock
55
yarn.lock
|
@ -630,7 +630,7 @@
|
|||
core-js-pure "^3.0.0"
|
||||
regenerator-runtime "^0.13.4"
|
||||
|
||||
"@babel/runtime@^7.0.0":
|
||||
"@babel/runtime@^7.0.0", "@babel/runtime@^7.8.4":
|
||||
version "7.11.2"
|
||||
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.11.2.tgz#f549c13c754cc40b87644b9fa9f09a6a95fe0736"
|
||||
integrity sha512-TeWkU52so0mPtDcaCTxNBI/IHiz0pZgr8VEFqXFtZWpYD08ZB6FaSwVAS8MKRQAP3bYKiVjwysOJgMFY28o6Tw==
|
||||
|
@ -2096,7 +2096,7 @@ cli-cursor@^3.1.0:
|
|||
dependencies:
|
||||
restore-cursor "^3.1.0"
|
||||
|
||||
cli-spinners@^2.0.0:
|
||||
cli-spinners@^2.0.0, cli-spinners@^2.2.0:
|
||||
version "2.4.0"
|
||||
resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.4.0.tgz#c6256db216b878cfba4720e719cec7cf72685d7f"
|
||||
integrity sha512-sJAofoarcm76ZGpuooaO0eDy8saEy+YoZBLjC4h8srt4jeBnkYeOgqxgsJQTpyt2LjI5PTfLJHSL+41Yu4fEJA==
|
||||
|
@ -2845,7 +2845,7 @@ env-paths@^2.2.0:
|
|||
resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-2.2.0.tgz#cdca557dc009152917d6166e2febe1f039685e43"
|
||||
integrity sha512-6u0VYSCo/OW6IoD5WCLLy9JUGARbamfSavcNXry/eu8aHVFei6CD3Sw+VGX5alea1i9pgPHW0mbu6Xj0uBh7gA==
|
||||
|
||||
envinfo@^7.7.2:
|
||||
envinfo@^7.5.0, envinfo@^7.7.2:
|
||||
version "7.7.3"
|
||||
resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.7.3.tgz#4b2d8622e3e7366afb8091b23ed95569ea0208cc"
|
||||
integrity sha512-46+j5QxbPWza0PB1i15nZx0xQ4I/EfQxg9J8Had3b408SV63nEtor2e+oiY63amTo9KTuh2a3XLObNwduxYwwA==
|
||||
|
@ -3712,7 +3712,7 @@ glob-parent@^5.0.0, glob-parent@^5.1.0:
|
|||
dependencies:
|
||||
is-glob "^4.0.1"
|
||||
|
||||
glob@^7.1.1, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6:
|
||||
glob@^7.0.0, glob@^7.1.1, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6:
|
||||
version "7.1.6"
|
||||
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6"
|
||||
integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==
|
||||
|
@ -4182,7 +4182,7 @@ internal-slot@^1.0.2:
|
|||
has "^1.0.3"
|
||||
side-channel "^1.0.2"
|
||||
|
||||
interpret@^1.2.0:
|
||||
interpret@^1.0.0, interpret@^1.2.0:
|
||||
version "1.4.0"
|
||||
resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.4.0.tgz#665ab8bc4da27a774a40584e812e3e0fa45b1a1e"
|
||||
integrity sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==
|
||||
|
@ -5354,7 +5354,7 @@ mem@^1.1.0:
|
|||
dependencies:
|
||||
mimic-fn "^1.0.0"
|
||||
|
||||
mem@^4.0.0:
|
||||
mem@^4.0.0, mem@^4.3.0:
|
||||
version "4.3.0"
|
||||
resolved "https://registry.yarnpkg.com/mem/-/mem-4.3.0.tgz#461af497bc4ae09608cdb2e60eefb69bff744178"
|
||||
integrity sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==
|
||||
|
@ -7103,6 +7103,25 @@ react-native-macos@0.62.1:
|
|||
use-subscription "^1.0.0"
|
||||
whatwg-fetch "^3.0.0"
|
||||
|
||||
react-native-windows@0.62.7:
|
||||
version "0.62.7"
|
||||
resolved "https://registry.yarnpkg.com/react-native-windows/-/react-native-windows-0.62.7.tgz#f527b2a42a869b0d80af1fbb6d55051904253175"
|
||||
integrity sha512-Y46FUBSwBh3rfLD7lTlshb9P040V3ZaBpm2MrB6UziE3YnXK4NwvcdpmQd3LJZWMjUvklSJBzU1z34xTB1yETQ==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.8.4"
|
||||
cli-spinners "^2.2.0"
|
||||
create-react-class "^15.6.3"
|
||||
envinfo "^7.5.0"
|
||||
fbjs "^1.0.0"
|
||||
glob "^7.1.1"
|
||||
ora "^3.4.0"
|
||||
prop-types "^15.7.2"
|
||||
regenerator-runtime "^0.13.2"
|
||||
shelljs "^0.7.8"
|
||||
username "^5.1.0"
|
||||
uuid "^3.3.2"
|
||||
xml-parser "^1.2.1"
|
||||
|
||||
react-native@0.62.2:
|
||||
version "0.62.2"
|
||||
resolved "https://registry.yarnpkg.com/react-native/-/react-native-0.62.2.tgz#d831e11a3178705449142df19a70ac2ca16bad10"
|
||||
|
@ -7826,6 +7845,15 @@ shell-quote@^1.6.1:
|
|||
resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.7.2.tgz#67a7d02c76c9da24f99d20808fcaded0e0e04be2"
|
||||
integrity sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg==
|
||||
|
||||
shelljs@^0.7.8:
|
||||
version "0.7.8"
|
||||
resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.8.tgz#decbcf874b0d1e5fb72e14b164a9683048e9acb3"
|
||||
integrity sha1-3svPh0sNHl+3LhSxZKloMEjprLM=
|
||||
dependencies:
|
||||
glob "^7.0.0"
|
||||
interpret "^1.0.0"
|
||||
rechoir "^0.6.2"
|
||||
|
||||
side-channel@^1.0.2:
|
||||
version "1.0.3"
|
||||
resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.3.tgz#cdc46b057550bbab63706210838df5d4c19519c3"
|
||||
|
@ -8824,6 +8852,14 @@ user-home@^1.1.1:
|
|||
resolved "https://registry.yarnpkg.com/user-home/-/user-home-1.1.1.tgz#2b5be23a32b63a7c9deb8d0f28d485724a3df190"
|
||||
integrity sha1-K1viOjK2Onyd640PKNSFcko98ZA=
|
||||
|
||||
username@^5.1.0:
|
||||
version "5.1.0"
|
||||
resolved "https://registry.yarnpkg.com/username/-/username-5.1.0.tgz#a7f9325adce2d0166448cdd55d4985b1360f2508"
|
||||
integrity sha512-PCKbdWw85JsYMvmCv5GH3kXmM66rCd9m1hBEDutPNv94b/pqCMT4NtcKyeWYvLFiE8b+ha1Jdl8XAaUdPn5QTg==
|
||||
dependencies:
|
||||
execa "^1.0.0"
|
||||
mem "^4.3.0"
|
||||
|
||||
util-deprecate@^1.0.1, util-deprecate@~1.0.1:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"
|
||||
|
@ -9055,6 +9091,13 @@ xdg-basedir@^3.0.0:
|
|||
resolved "https://registry.yarnpkg.com/xdg-basedir/-/xdg-basedir-3.0.0.tgz#496b2cc109eca8dbacfe2dc72b603c17c5870ad4"
|
||||
integrity sha1-SWsswQnsqNus/i3HK2A8F8WHCtQ=
|
||||
|
||||
xml-parser@^1.2.1:
|
||||
version "1.2.1"
|
||||
resolved "https://registry.yarnpkg.com/xml-parser/-/xml-parser-1.2.1.tgz#c31f4c34f2975db82ad013222120592736156fcd"
|
||||
integrity sha1-wx9MNPKXXbgq0BMiISBZJzYVb80=
|
||||
dependencies:
|
||||
debug "^2.2.0"
|
||||
|
||||
xmlbuilder@^9.0.7:
|
||||
version "9.0.7"
|
||||
resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-9.0.7.tgz#132ee63d2ec5565c557e20f4c22df9aca686b10d"
|
||||
|
|
Загрузка…
Ссылка в новой задаче