docs: fix typo

This commit is contained in:
leejooy96 committed 2024-06-11 18:01:38 +09:00
1 parent 8668c26a22
commit 9f5d7e48a6
4 files changed
+8 -8

No files matched your search

+2 -2
View File
@@ -18,7 +18,7 @@ on:
jobs: jobs:
app-test: app-test:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
name: Test NodeJS ${{ matrix.node_version }} on ${{ matrix.os }} name: Test Node.js ${{ matrix.node_version }} on ${{ matrix.os }}
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
@@ -35,7 +35,7 @@ jobs:
run: | run: |
sudo apt install -y -q --no-install-recommends xvfb sudo apt install -y -q --no-install-recommends xvfb
- name: Setup NodeJS ${{ matrix.node_version }} - name: Setup Node.js ${{ matrix.node_version }}
uses: actions/setup-node@v4 uses: actions/setup-node@v4
with: with:
node-version: ${{ matrix.node_version }} node-version: ${{ matrix.node_version }}
+1 -1
View File
@@ -1,4 +1,4 @@
# .gitignore for NodeJS Projects # .gitignore for Node.js Projects
# ---------- Start of common ignore files # ---------- Start of common ignore files
# Node artifact files # Node artifact files
@@ -4,17 +4,17 @@ A **Vutron** application is divided into code into a Main process and a Renderer
**"Main"** is the code of `src/main` and is mainly the process code handled by Electron. **"Renderer"** is the code of `src/renderer`, mainly for front-end rendering process like Vue. **"Main"** is the code of `src/main` and is mainly the process code handled by Electron. **"Renderer"** is the code of `src/renderer`, mainly for front-end rendering process like Vue.
In general, **NodeJS** scripts cannot be run in the renderer process. Examples include modules that contain APIs used by NodeJS, or native modules of **NodeJS** such as `path` or `net`, `os` or `crypto`. In general, **Node.js** scripts cannot be run in the renderer process. Examples include modules that contain APIs used by Node.js, or native modules of **Node.js** such as `path` or `net`, `os` or `crypto`.
Preload scripts are run before the renderer is loaded. It creates a bridge to the main process to keep the execution of NodeJS scripts in the renderer area separate and isolated for security reasons. Preload scripts are run before the renderer is loaded. It creates a bridge to the main process to keep the execution of Node.js scripts in the renderer area separate and isolated for security reasons.
For secure script execution, it is recommended that the main process executes the Node scripts, and the renderer receives the execution results via messaging. This can be implemented via **IPC communication**. For secure script execution, it is recommended that the main process executes the Node scripts, and the renderer receives the execution results via messaging. This can be implemented via **IPC communication**.
For more information on this, see the following articles: https://www.electronjs.org/docs/latest/tutorial/ipc For more information on this, see the following articles: https://www.electronjs.org/docs/latest/tutorial/ipc
### How to run NodeJS on a renderer? ### How to run Node.js on a renderer?
If you want to skip the security issues and use NodeJS scripts in your renderer, you need to set `nodeIntegration` to `true` in your `vite.config.ts` file. If you want to skip the security issues and use Node.js scripts in your renderer, you need to set `nodeIntegration` to `true` in your `vite.config.ts` file.
```javascript ```javascript
rendererPlugin({ rendererPlugin({
@@ -60,7 +60,7 @@ order: 1
├─ .prettierrc - Prettier rule configurations ├─ .prettierrc - Prettier rule configurations
├─ CODE_OF_CONDUCT.md - Files used only on GitHub ├─ CODE_OF_CONDUCT.md - Files used only on GitHub
├─ LICENSE - Project license file ├─ LICENSE - Project license file
├─ package.json - NodeJS package configurations ├─ package.json - Node.js package configurations
├─ package-lock.json ├─ package-lock.json
├─ playwright.config.ts - Playwright test rules configurations ├─ playwright.config.ts - Playwright test rules configurations
├─ tsconfig.json - TypeScript configurations ├─ tsconfig.json - TypeScript configurations