refactor(with-electron): upgrade to sdk 37 and add known workaround

This commit is contained in:
Cedric van Putten
2020-04-22 16:20:03 +02:00
parent 628f8c6120
commit 6ce3815478
5 changed files with 27 additions and 12618 deletions

View File

@@ -18,4 +18,4 @@ const styles = StyleSheet.create({
alignItems: 'center', alignItems: 'center',
justifyContent: 'center', justifyContent: 'center',
}, },
}); });

View File

@@ -1,14 +1,22 @@
# Electron Example # Electron Example
<p>
<!-- Web -->
<img alt="Supports Expo Web" longdesc="Supports Expo Web" src="https://img.shields.io/badge/web-4630EB.svg?style=flat-square&logo=GOOGLE-CHROME&labelColor=4285F4&logoColor=fff" />
</p>
> 🚨 Electron support is experimental, so the workflow is suboptimal and subject to breaking changes. If you find bugs please report them on [expo/expo-cli](https://github.com/expo/expo-cli/issues) with the `[electron]` tag in the title. > 🚨 Electron support is experimental, so the workflow is suboptimal and subject to breaking changes. If you find bugs please report them on [expo/expo-cli](https://github.com/expo/expo-cli/issues) with the `[electron]` tag in the title.
[Electron][electron] is a framework for creating desktop apps that run in a Chromium wrapper. Using Expo with Electron will enable you to use your existing components to build OSX, Windows, and Linux apps. [Electron][electron] is a framework for creating desktop apps that run in a Chromium wrapper. Using Expo with Electron will enable you to use your existing components to build OSX, Windows, and Linux apps.
For more info [check out the latest docs!](https://github.com/expo/expo/blob/master/docs/pages/versions/unversioned/guides/using-electron.md) For more info [check out the latest docs!](https://github.com/expo/expo/blob/master/docs/pages/versions/unversioned/guides/using-electron.md)
### Running ## 🚀 How to use
1. Create a new Expo project `expo init` - Run `yarn` or `npm install`
2. cd into the project and run `yarn add -D @expo/electron-adapter` - Run `yarn expo-electron start`
3. Now run `yarn expo-electron` to bootstrap the project. You can read more about what this does in the docs: [Using Electron](https://github.com/expo/expo/blob/master/docs/pages/versions/unversioned/guides/using-electron.md). - Wait until the web build is finished and Electron is started.
4. Run `yarn expo-electron start` to start the project.
## 📝 Notes
- [Known issue with app entry](https://github.com/expo/expo-cli/issues/1385)

2
with-electron/app.ts Normal file
View File

@@ -0,0 +1,2 @@
// temporary workaround for https://github.com/expo/expo-cli/issues/1385
export { default } from './App.tsx';

View File

@@ -9,20 +9,19 @@
"eject": "expo eject" "eject": "expo eject"
}, },
"dependencies": { "dependencies": {
"@expo/electron-adapter": "0.0.0-alpha.12", "@expo/electron-adapter": "0.0.0-alpha.48",
"@expo/webpack-config": "^0.10.7", "@expo/webpack-config": "0.12.0",
"electron": "6.1.7", "electron": "6.1.10",
"expo": "^36.0.0", "expo": "37.0.7",
"react": "16.9.0", "react": "16.9.0",
"react-dom": "16.9.0", "react-dom": "16.9.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-36.0.1.tar.gz", "react-native": "https://github.com/expo/react-native/archive/sdk-37.0.1.tar.gz",
"react-native-web": "^0.11.7" "react-native-web": "0.11.7"
}, },
"devDependencies": { "devDependencies": {
"@types/react": "^16.9.0", "@types/react": "16.9.34",
"@types/react-native": "^0.57.65", "@types/react-native": "0.61.23",
"babel-preset-expo": "^7.1.0", "babel-preset-expo": "8.1.0",
"typescript": "^3.7.4" "typescript": "3.8.3"
}, }
"private": true
} }

File diff suppressed because it is too large Load Diff