Skip to content

Commit

Permalink
docs: 鉁忥笍 Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
hampoelz committed Aug 25, 2023
1 parent 90e8dda commit 8aac139
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ _If you are upgrading: please see [`UPGRADING.md`](UPGRADING.md)._

### Changed

- **Breaking:** Remove return type of `send()` method
- **Breaking:** Change return type of `send()` method to `void`
- Rewrite the `bridge` module in TypeScript ([#14](https://github.com/hampoelz/Capacitor-NodeJS/issues/14))
- Start the Node.js runtime as child process on Electron ([#12](https://github.com/hampoelz/Capacitor-NodeJS/issues/12), [#15](https://github.com/hampoelz/Capacitor-NodeJS/issues/15))
- Change loading mechanism of the `bridge` module to a built-in module ([#12](https://github.com/hampoelz/Capacitor-NodeJS/issues/12))
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ This guide shows how to add a minimal Node.js project to a Capacitor application

### Basics

In the example below uses the Vite build system. However, any build system can be used as long as the following criteria are met:
In the example below the Vite build system is used. However, any build system can be used as long as the following criteria are met:

1. The Node.js project (to be executed by the engine) must be located in a subdirectory named `nodejs` _(or the path set via `nodeDir`)_ of the Capacitor `webDir`.
2. The Node.js project must have a starting point, this can either be a script named `index.js` or a package.json with a `main` field.
Expand Down Expand Up @@ -237,12 +237,12 @@ After installing modules, rebuild and sync the Capacitor project so that the Nod

For convenience, a postinstall script can be added to the main `package.json` in the Capacitor project to automatically install the modules of the Node.js project:

```json
```javascript
// package.json
{
"scripts": {
"postinstall": "cd static/nodejs/ && npm install"
},
},
// other config options
}
```
Expand All @@ -261,7 +261,7 @@ The Node.js project can quickly grow very large when installing modules.
For projects that contain a large number of files, the load time can be reduced by decreasing the number of files.

For this reason, it is recommended to use bunder tools such as [Rollup.js](https://rollupjs.org/).
In the following example, Rollup is used to bundle the Node.js project with all the modules used in a single file.
In the following example, Rollup is used to bundle the Node.js project with all its modules in a single file.

To get started install Rollup and its plugins "commonjs", "node-resolve" and "json" into the root of the Capacitor project.
If Vite is used as build system, Rollup is already pre-installed and does not need to be installed:
Expand Down

0 comments on commit 8aac139

Please sign in to comment.