Skip to content

Commit

Permalink
v0.20.0
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulLeCam committed Oct 25, 2024
1 parent 0958cec commit b6b6b53
Show file tree
Hide file tree
Showing 35 changed files with 4,517 additions and 5,882 deletions.
Empty file modified .editorconfig
100644 → 100755
Empty file.
12 changes: 6 additions & 6 deletions .github/workflows/main.yml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,20 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node: ['16.x', '18.x']
node: [20, 22]
os: [ubuntu-latest, macOS-latest]

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v2
uses: pnpm/action-setup@v3
with:
version: 8
version: 9

- name: Use Node ${{ matrix.node }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: 'pnpm'
Expand All @@ -29,4 +29,4 @@ jobs:
run: pnpm install --frozen-lockfile

- name: Lint
run: cd library && pnpm run lint
run: pnpm run lint
2 changes: 2 additions & 0 deletions .gitignore
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
node_modules
lib
.webpack
5 changes: 5 additions & 0 deletions CHANGELOG.md
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## v0.20.0 (2024-10-25)

- Updated Electron dependency to v33.0.
- Refactored setup.

## v0.19.0 (2023-04-09)

- Updated React Native for Web dependency to v0.19.
Expand Down
Empty file modified README.md
100644 → 100755
Empty file.
40 changes: 40 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
"organizeImports": {
"enabled": true,
"ignore": []
},
"formatter": {
"enabled": true,
"formatWithErrors": false,
"ignore": [],
"attributePosition": "auto",
"indentStyle": "space",
"indentWidth": 2,
"lineWidth": 100
},
"javascript": {
"formatter": {
"arrowParentheses": "always",
"bracketSameLine": true,
"bracketSpacing": true,
"jsxQuoteStyle": "double",
"quoteProperties": "asNeeded",
"quoteStyle": "single",
"semicolons": "asNeeded",
"trailingCommas": "all"
}
},
"linter": {
"enabled": true,
"ignore": [],
"rules": {
"recommended": true
}
},
"vcs": {
"enabled": true,
"clientKind": "git",
"useIgnoreFile": true
}
}
Empty file modified example/.gitignore
100644 → 100755
Empty file.
32 changes: 15 additions & 17 deletions example/package.json
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,31 @@
"productName": "React Native Electron",
"version": "1.0.0",
"description": "Example React Native Electron application",
"author": {
"name": "Paul Le Cam",
"email": "[email protected]"
},
"keywords": [],
"license": "MIT",
"main": ".webpack/main",
"scripts": {
"start": "electron-forge start",
"make": "electron-forge make",
"package": "electron-forge package"
},
"keywords": [],
"author": {
"name": "Paul Le Cam",
"email": "[email protected]"
},
"license": "MIT",
"dependencies": {
"react": "18.2.0",
"react-dom": "^18.2.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-native-electron": "workspace:*"
},
"devDependencies": {
"@babel/core": "^7.21.4",
"@babel/preset-react": "^7.17.12",
"@electron-forge/cli": "^6.1.1",
"@electron-forge/maker-zip": "^6.1.1",
"@electron-forge/plugin-webpack": "6.1.1",
"babel-loader": "^9.1.2",
"electron": "^24.0.0",
"@electron-forge/cli": "^7.5.0",
"@electron-forge/maker-zip": "^7.5.0",
"@electron-forge/plugin-webpack": "7.5.0",
"electron": "^33.0.2",
"node-loader": "^2.0.0",
"webpack": "^5.78.0"
"swc-loader": "^0.2.6",
"webpack": "^5.95.0"
},
"config": {
"forge": {
Expand All @@ -51,7 +49,7 @@
"html": "./src/index.html",
"js": "./src/renderer.js",
"preload": {
"js": "./node_modules/react-native-electron/preload.js"
"js": "./node_modules/react-native-electron/lib/preload.js"
},
"name": "main_window"
}
Expand Down
22 changes: 7 additions & 15 deletions example/src/App.js
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React, { StrictMode, useEffect, useState } from 'react'
import {
Platform,
Alert,
Clipboard,
Linking,
Platform,
StyleSheet,
Text,
TouchableOpacity,
Expand Down Expand Up @@ -95,14 +95,10 @@ function NavBar({ active, onSelect }) {
const tabs = Object.keys(WEBSITES).map((website) => (
<TouchableWithoutFeedback
key={website}
onPress={function () {
onPress={() => {
onSelect(website)
}}>
<View
style={[
styles.navBarTab,
active === website && styles.navBarTabActive,
]}>
<View style={[styles.navBarTab, active === website && styles.navBarTabActive]}>
<Text>{website}</Text>
</View>
</TouchableWithoutFeedback>
Expand All @@ -120,15 +116,15 @@ function UriBar({ uri }) {
</Text>
</View>
<TouchableOpacity
onPress={function () {
onPress={() => {
Clipboard.setString(uri)
Alert.alert('Copy to clipboard', `Copied URI to clipboard: ${uri}`)
}}
style={styles.uriTouchable}>
<Text style={styles.uriText}>Copy to clipboard</Text>
</TouchableOpacity>
<TouchableOpacity
onPress={function () {
onPress={() => {
Linking.openURL(uri)
}}
style={styles.uriTouchable}>
Expand All @@ -152,9 +148,7 @@ function SelectUriBar() {

function schemeStyle(styleName, colorScheme) {
const baseStyle = styles[styleName]
return colorScheme === 'dark'
? [baseStyle, styles[`${styleName}Dark`]]
: baseStyle
return colorScheme === 'dark' ? [baseStyle, styles[`${styleName}Dark`]] : baseStyle
}

export default function App() {
Expand Down Expand Up @@ -195,9 +189,7 @@ export default function App() {
<StrictMode>
<View style={schemeStyle('layout', colorScheme)}>
<View style={styles.titleView}>
<Text style={schemeStyle('titleText', colorScheme)}>
React Native Electron
</Text>
<Text style={schemeStyle('titleText', colorScheme)}>React Native Electron</Text>
</View>
<View style={styles.subtitleView}>
<Text style={schemeStyle('subtitleText', colorScheme)}>
Expand Down
Empty file modified example/src/index.html
100644 → 100755
Empty file.
Empty file modified example/src/main.js
100644 → 100755
Empty file.
Empty file modified example/src/renderer.js
100644 → 100755
Empty file.
Empty file modified example/webpack.main.config.js
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion example/webpack.renderer.config.js
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module.exports = {
},
resolve: {
alias: {
'react-native': require('path').resolve(__dirname, '../library'),
'react-native': require('node:path').resolve(__dirname, '../library'),
},
},
}
17 changes: 12 additions & 5 deletions example/webpack.rules.js
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
module.exports = [
{
test: /\.jsx?$/,
test: /\.js$/,
exclude: /(node_modules)/,
use: {
loader: 'babel-loader',
loader: 'swc-loader',
options: {
exclude: /node_modules/,
presets: ['@babel/preset-react'],
plugins: ['@babel/plugin-proposal-export-namespace-from'],
jsc: {
parser: {
syntax: 'ecmascript',
jsx: true,
},
},
env: {
targets: 'Electron >= 33',
},
},
},
},
Expand Down
48 changes: 0 additions & 48 deletions library/.babelrc

This file was deleted.

46 changes: 0 additions & 46 deletions library/.eslintrc.json

This file was deleted.

Empty file modified library/.gitignore
100644 → 100755
Empty file.
Empty file modified library/LICENSE
100644 → 100755
Empty file.
Loading

0 comments on commit b6b6b53

Please sign in to comment.