Skip to content

Commit

Permalink
docs: fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
jooy2 committed Jun 11, 2024
1 parent 8668c26 commit 9f5d7e4
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/app-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ on:
jobs:
app-test:
runs-on: ${{ matrix.os }}
name: Test NodeJS ${{ matrix.node_version }} on ${{ matrix.os }}
name: Test Node.js ${{ matrix.node_version }} on ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
Expand All @@ -35,7 +35,7 @@ jobs:
run: |
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
with:
node-version: ${{ matrix.node_version }}
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# .gitignore for NodeJS Projects
# .gitignore for Node.js Projects
# ---------- Start of common ignore files

# Node artifact files
Expand Down
8 changes: 4 additions & 4 deletions docs/src/electron-how-to/main-and-renderer-process.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

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 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
rendererPlugin({
Expand Down
2 changes: 1 addition & 1 deletion docs/src/project-structures/project-structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ order: 1
├─ .prettierrc - Prettier rule configurations
├─ CODE_OF_CONDUCT.md - Files used only on GitHub
├─ LICENSE - Project license file
├─ package.json - NodeJS package configurations
├─ package.json - Node.js package configurations
├─ package-lock.json
├─ playwright.config.ts - Playwright test rules configurations
├─ tsconfig.json - TypeScript configurations
Expand Down

0 comments on commit 9f5d7e4

Please sign in to comment.