Skip to content

Commit 61a1d87

Browse files
authored
SourceCode module should provide scriptURL when running livereload without webdebugger (#3803)
* Minor fixups after initial rn-win32 checkin * Provide source uri in SourceCode module when using livereload * Provide source uri in SourceCode module when using livereload * Change files * build fix * fix build * fix build
1 parent 60b7ea9 commit 61a1d87

15 files changed

+84
-36
lines changed

.ado/windows-vs-pr.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,13 @@ jobs:
238238
/p:RNW_PKG_VERSION_STR="Private Build"
239239
/p:RNW_PKG_VERSION="1000,0,0,0"
240240

241+
- task: CmdLine@2
242+
displayName: Build react-native-win32 RNTester bundle
243+
inputs:
244+
script: yarn bundle
245+
workingDirectory: packages/react-native-win32
246+
condition: and(succeeded(), eq(variables['BuildConfiguration'], 'Debug'), eq(variables['BuildPlatform'], 'x64'))
247+
241248
- task: VSTest@2
242249
displayName: Run Desktop Unit Tests
243250
timeoutInMinutes: 5 # Set smaller timeout , due to hangs

.vscode/settings.json

Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,31 +8,33 @@
88
"**/dist": true
99
},
1010
"editor.formatOnSave": true,
11-
// turn off formatting for JS and JSX, we will do this via eslint
12-
"[javascript]": {
13-
"editor.formatOnSave": false
14-
},
15-
"[javascriptreact]": {
16-
"editor.formatOnSave": false
17-
},
18-
"[typescript]": {
19-
"editor.formatOnSave": false
20-
},
21-
"[typescriptreact]": {
22-
"editor.formatOnSave": false
23-
},
11+
"eslint.format.enable": true,
2412
"eslint.packageManager": "yarn",
25-
"eslint.autoFixOnSave": true,
2613
"eslint.enable": true,
2714
"eslint.validate": [
28-
{"language": "javascript", "autoFix": true},
29-
{"language": "javascriptreact", "autoFix": true},
30-
{"language": "typescript", "autoFix": true},
31-
{"language": "typescriptreact", "autoFix": true}
15+
"javascript",
16+
"javascriptreact",
17+
"typescript",
18+
"typescriptreact"
3219
],
3320
"eslint.options": {
3421
"configFile": "./vnext/.eslintrc.js"
3522
},
23+
"[json]": {
24+
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
25+
},
26+
"[jsonc]": {
27+
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
28+
},
29+
"[typescript]": {
30+
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
31+
},
32+
"[typescriptreact]": {
33+
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
34+
},
35+
"[javascript]": {
36+
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
37+
},
3638
// These should run through eslint
3739
"prettier.disableLanguages": [
3840
"javascript",
@@ -44,5 +46,8 @@
4446
"clang-format.language.typescript.enable": false,
4547
"clang-format.assumeFilename": "${workspaceFolder}/.clang-format",
4648
"clang-format.executable": "${workspaceRoot}/vnext/node_modules/.bin/clang-format",
47-
"typescript.tsdk": "node_modules\\typescript\\lib"
49+
"typescript.tsdk": "node_modules\\typescript\\lib",
50+
"editor.codeActionsOnSave": {
51+
"source.fixAll.eslint": true
52+
}
4853
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"type": "none",
3+
"comment": "Dont checkin generated index files",
4+
"packageName": "@office-iss/react-native-win32",
5+
"email": "acoates@microsoft.com",
6+
"commit": "ee0de45b4e776cd6d110b6e5fdb94bfbae1c7133",
7+
"date": "2019-12-18T22:17:55.695Z"
8+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"type": "prerelease",
3+
"comment": "Provide source uri in SourceCode module when using livereload",
4+
"packageName": "react-native-windows",
5+
"email": "acoates@microsoft.com",
6+
"commit": "ee0de45b4e776cd6d110b6e5fdb94bfbae1c7133",
7+
"date": "2019-12-18T22:17:59.673Z"
8+
}

packages/react-native-win32/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/demo
22
/dist
3+
/index.*
34
/IntegrationTests
45
/jest
56
/lib

packages/react-native-win32/README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# @office-iss/react-native-win32
2+
3+
**Internal use only**
4+
5+
To better support some of our open source efforts, we are publishing this @office-iss/react-native-win32 JS package that office uses on win32. This is not a package that is generally consumable by other since it requires Office's UI framework which isn't open source. But it does allow some of our other cross platform efforts to be able to open source their work where previously its been unable to if Office win32 was one of the target platforms. This will enable projects such as our cross platform component libraries to be able to be published to open source.
6+
7+
# Running react-native on win32.
8+
9+
We do have a solution for running react-native in a win32 app. You can run react-native-windows on win32 using Xaml Islands. We are working on expanding the set of supported windows versions to broaden the support of that, and provide more samples of how to do that.

packages/react-native-win32/docs/api/react-native-win32.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ This package provides Win32 specific components and provides JS implementations
1212
| --- | --- |
1313
| [ButtonWin32](./react-native-win32.buttonwin32.md) | React-native <Button> control with additional Win32-specific functionality. |
1414
| [TextWin32](./react-native-win32.textwin32.md) | |
15-
| [TouchableWin32](./react-native-win32.touchablewin32.md) | TouchableWin32 is a 'compentantization' of the Touchable Mixin in React Native. This means that instead of implementing components such as TouchableHighlight via the mixin, they are merely implemented as wrappers around TouchableWin32, forwarding the correct set of props. Additionally, TouchableWin32 supports hover via onMouseEnter and onMouseLeave and focus/blur via onFocus/onBlur. TouchableWin32 also allows for functions as child components (that use the internal state of the touchable to conditionally render children) as well functions as styles (that use internal state to conditionally calculate styles) |
15+
| [TouchableWin32](./react-native-win32.touchablewin32.md) | TouchableWin32 is a 'componentization' of the Touchable Mixin in React Native. This means that instead of implementing components such as TouchableHighlight via the mixin, they are merely implemented as wrappers around TouchableWin32, forwarding the correct set of props. Additionally, TouchableWin32 supports hover via onMouseEnter and onMouseLeave and focus/blur via onFocus/onBlur. TouchableWin32 also allows for functions as child components (that use the internal state of the touchable to conditionally render children) as well functions as styles (that use internal state to conditionally calculate styles) |
1616
| [ViewWin32](./react-native-win32.viewwin32.md) | |
1717

1818
## Enumerations

packages/react-native-win32/docs/api/react-native-win32.touchablewin32.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
## TouchableWin32 class
66

7-
TouchableWin32 is a 'compentantization' of the Touchable Mixin in React Native. This means that instead of implementing components such as TouchableHighlight via the mixin, they are merely implemented as wrappers around TouchableWin32, forwarding the correct set of props. Additionally, TouchableWin32 supports hover via onMouseEnter and onMouseLeave and focus/blur via onFocus/onBlur. TouchableWin32 also allows for functions as child components (that use the internal state of the touchable to conditionally render children) as well functions as styles (that use internal state to conditionally calculate styles)
7+
TouchableWin32 is a 'componentization' of the Touchable Mixin in React Native. This means that instead of implementing components such as TouchableHighlight via the mixin, they are merely implemented as wrappers around TouchableWin32, forwarding the correct set of props. Additionally, TouchableWin32 supports hover via onMouseEnter and onMouseLeave and focus/blur via onFocus/onBlur. TouchableWin32 also allows for functions as child components (that use the internal state of the touchable to conditionally render children) as well functions as styles (that use internal state to conditionally calculate styles)
88

99
<b>Signature:</b>
1010

packages/react-native-win32/index.d.ts

Lines changed: 0 additions & 2 deletions
This file was deleted.

packages/react-native-win32/index.js

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)