react-native-electron-platform 0.0.4 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -8,7 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
8
8
  ## [1.0.0] - 2024-02-24
9
9
 
10
10
  ### Added
11
- - Initial release of react-native-electron boilerplate
11
+ - Initial release of react-native-electron-platform boilerplate
12
12
  - Electron main process with auto-updater
13
13
  - Preload script for secure IPC communication
14
14
  - Webpack configuration helper for React Native web builds
package/CONTRIBUTING.md CHANGED
@@ -1,6 +1,6 @@
1
- # Contributing to react-native-electron
1
+ # Contributing to react-native-electron-platform
2
2
 
3
- Thank you for your interest in contributing to react-native-electron! We welcome contributions from the community.
3
+ Thank you for your interest in contributing to react-native-electron-platform! We welcome contributions from the community.
4
4
 
5
5
  ## How to Contribute
6
6
 
package/LICENSE CHANGED
@@ -1,21 +1,5 @@
1
- MIT License
2
-
3
1
  Copyright (c) 2024 JESCON TECHNOLOGIES PVT LTD
4
2
 
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
3
+ All rights reserved.
14
4
 
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
5
+ This software is proprietary and confidential. Unauthorized copying, modification, distribution, or use is strictly prohibited.
package/README.md CHANGED
@@ -1,8 +1,7 @@
1
- # react-native-electron
1
+ # react-native-electron-platform
2
2
 
3
- [![npm version](https://badge.fury.io/js/react-native-electron.svg)](https://badge.fury.io/js/react-native-electron)
4
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5
- [![CI](https://github.com/dpraful/react-native-electron/workflows/CI/badge.svg)](https://github.com/dpraful/react-native-electron/actions)
3
+ [![npm version](https://badge.fury.io/js/react-native-electron-platform.svg)](https://badge.fury.io/js/react-native-electron-platform)
4
+ [![CI](https://github.com/dpraful/react-native-electron-platform/workflows/CI/badge.svg)](https://github.com/dpraful/react-native-electron-platform/actions)
6
5
 
7
6
  A boilerplate and utility library for running React Native applications in Electron, supporting both desktop and web platforms.
8
7
 
@@ -19,7 +18,7 @@ A boilerplate and utility library for running React Native applications in Elect
19
18
  ## Installation
20
19
 
21
20
  ```bash
22
- npm install react-native-electron
21
+ npm install react-native-electron-platform
23
22
  ```
24
23
 
25
24
  ## Usage
@@ -32,7 +31,7 @@ npm install react-native-electron
32
31
  ### As a Library
33
32
 
34
33
  ```javascript
35
- import { categorizePackages, isWebSupported } from 'react-native-electron';
34
+ import { categorizePackages, isWebSupported } from 'react-native-electron-platform';
36
35
 
37
36
  const packages = categorizePackages();
38
37
  // Use the categorized packages for your build configuration
@@ -74,4 +73,4 @@ See [CHANGELOG.md](CHANGELOG.md) for a list of changes and version history.
74
73
 
75
74
  ## License
76
75
 
77
- This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
76
+ This project is proprietary software owned by JESCON TECHNOLOGIES PVT LTD. All rights reserved. Unauthorized use, copying, modification, or distribution is prohibited.
package/package.json CHANGED
@@ -1,12 +1,11 @@
1
1
  {
2
2
  "name": "react-native-electron-platform",
3
- "version": "0.0.4",
3
+ "version": "0.0.6",
4
4
  "description": "A boilerplate and utilities for running React Native applications in Electron",
5
5
  "main": "index.mjs",
6
6
  "scripts": {
7
7
  "start": "electron src/main.mjs",
8
- "build": "webpack --config webpack.config.mjs",
9
- "test": "echo \"No tests specified\" && exit 0"
8
+ "build": "webpack --config webpack.config.mjs"
10
9
  },
11
10
  "keywords": [
12
11
  "react-native",
@@ -15,8 +14,8 @@
15
14
  "web",
16
15
  "boilerplate"
17
16
  ],
18
- "author": "JESCON TECHNOLOGIES PVT LTD",
19
- "license": "MIT",
17
+ "author": "PRAFULDAS M M",
18
+ "license": "JESCON TECHNOLOGIES PVT LTD",
20
19
  "repository": {
21
20
  "type": "git",
22
21
  "url": "https://github.com/dpraful/react-native-electron-platform.git"
@@ -49,7 +48,6 @@
49
48
  "LICENSE",
50
49
  "CHANGELOG.md",
51
50
  "CODE_OF_CONDUCT.md",
52
- "CONTRIBUTING.md",
53
- "electron-builder.json"
51
+ "CONTRIBUTING.md"
54
52
  ]
55
53
  }
package/src/main.mjs CHANGED
@@ -52,7 +52,7 @@ function createWindow() {
52
52
  const primaryDisplay = screen.getPrimaryDisplay();
53
53
  const { x, y, width, height } = primaryDisplay.bounds;
54
54
 
55
- const iconPath = path.join(__dirname, "icon.ico");
55
+ const iconPath = path.join(app.getAppPath(), "electron/icon.ico");
56
56
  const preloadPath = path.join(__dirname, "preload.js");
57
57
 
58
58
  mainWindow = new BrowserWindow({
@@ -2,7 +2,7 @@ import path from 'path';
2
2
  import { fileURLToPath } from 'url';
3
3
  import { dirname } from 'path';
4
4
  import fs from 'fs';
5
- import { WEB_UNSUPPORTED_PACKAGES } from '../../../electron/nonmodules.mjs';
5
+ import { WEB_UNSUPPORTED_PACKAGES } from '../test/electron/nonmodules.mjs';
6
6
 
7
7
  const __dirname = dirname(fileURLToPath(import.meta.url));
8
8
 
@@ -1,7 +1,6 @@
1
1
  {
2
- "appId": "com.${name}.desktop",
3
- "productName": "${name}",
4
- "name": "${name}",
2
+ "appId": "com.ris.desktop",
3
+ "productName": "ris",
5
4
  "asar": {
6
5
  "smartUnpack": true
7
6
  },
@@ -13,8 +12,8 @@
13
12
  "npmRebuild": false,
14
13
  "nodeGypRebuild": false,
15
14
  "directories": {
16
- "output": "../../dist",
17
- "buildResources": "electron"
15
+ "output": "dist",
16
+ "buildResources": "node_modules/react-native-electron-platform/src"
18
17
  },
19
18
  "publish": [
20
19
  {
@@ -55,13 +54,14 @@
55
54
  "!**/node_modules/react-native/**",
56
55
  "!**/node_modules/react-native-*/*",
57
56
  "!**/node_modules/rn-fetch-blob/**",
58
- "!**/locales/**"
57
+ "!**/locales/**",
58
+ "node_modules/react-native-electron-platform/src/**/*"
59
59
  ],
60
60
  "asarUnpack": [
61
61
  "**/*.node"
62
62
  ],
63
63
  "extraMetadata": {
64
- "main": "electron/main.js"
64
+ "main": "node_modules/react-native-electron-platform/src/main.mjs"
65
65
  },
66
66
  "win": {
67
67
  "target": [
@@ -81,7 +81,7 @@
81
81
  "allowToChangeInstallationDirectory": true,
82
82
  "createDesktopShortcut": true,
83
83
  "createStartMenuShortcut": true,
84
- "shortcutName": "${name}",
84
+ "shortcutName": "ris",
85
85
  "artifactName": "${productName} Setup ${version}.${ext}"
86
86
  },
87
87
  "msi": {
Binary file
@@ -12,8 +12,8 @@ const __dirname = dirname(fileURLToPath(import.meta.url));
12
12
  class CopyFontsPlugin {
13
13
  apply(compiler) {
14
14
  compiler.hooks.afterEmit.tap('CopyFontsPlugin', () => {
15
- const sourceDir = path.join(__dirname, '../../node_modules/react-native-vector-icons/Fonts');
16
- const destDir = path.join(__dirname, '../../web-build/fonts');
15
+ const sourceDir = path.join(__dirname, '../react-native-vector-icons/Fonts');
16
+ const destDir = path.join(process.cwd(), 'web-build/fonts');
17
17
 
18
18
  if (!fs.existsSync(destDir)) {
19
19
  fs.mkdirSync(destDir, { recursive: true });
@@ -31,7 +31,7 @@ class CopyFontsPlugin {
31
31
 
32
32
  export default {
33
33
  mode: 'development',
34
- entry: path.resolve(__dirname, '../../electron/index.js'),
34
+ entry: path.resolve(process.cwd(), 'electron/index.js'),
35
35
  devtool: 'source-map',
36
36
 
37
37
  devServer: {
@@ -42,7 +42,7 @@ export default {
42
42
  historyApiFallback: true,
43
43
  liveReload: true,
44
44
  static: {
45
- directory: path.join(__dirname, '../../web-build'),
45
+ directory: path.join(process.cwd(), 'web-build'),
46
46
  publicPath: '/',
47
47
  },
48
48
  client: {
@@ -133,7 +133,7 @@ export default {
133
133
 
134
134
  output: {
135
135
  filename: 'bundle.js',
136
- path: path.resolve(__dirname, '../../web-build'),
136
+ path: path.resolve(process.cwd(), 'web-build'),
137
137
  clean: true,
138
138
  libraryTarget: 'umd', // UMD fixes 'exports is not defined'
139
139
  globalObject: 'this',
package/src/icon.ico DELETED
Binary file