docs: typo fix and add npm scripts document

This commit is contained in:
leejooy96 committed 2022-11-01 11:40:48 +09:00
1 parent 0a74654ee5
commit 65655bbc03
3 files changed
+27 -4

No files matched your search

+2 -2
View File
@@ -17,7 +17,7 @@ The built packages can be found in `dist/release/{version}` location.
## Build settings for projects that use Native Node modules
For projects that use the **Native Node Module**, add the following script to your package.json: When installing dependencies, electron-builder will take care of any modules that require rebuilding.
For projects that use the **Native Node Module**, add the following script to your `package.json`: When installing dependencies, `electron-builder` will take care of any modules that require rebuilding.
```json
{
@@ -43,7 +43,7 @@ $ npm run build
## Reduce bundle size by excluding development files
You can exclude files you don't need at build time by adding a file pattern to the files property of electron-builder.json5. This will save bundle capacity.
You can exclude files you don't need at build time by adding a file pattern to the files property of `electron-builder.json5`. This will save bundle capacity.
Below is an unnecessary `node_modules` file pattern that can further save bundles. Depending on the project, using the rules below may cause problems, so please review it before using.
+21
View File
@@ -0,0 +1,21 @@
# Npm Scripts
> npm run {SCRIPT_NAME}
| Script Name | Description |
|----------------|---------------------------------------------------------------------------------------------------------|
| `dev` | Start Electron as a development environment |
| `build` | Build a specified package for the entire operating system (Requires cross-platform build configuration) |
| `build:pre` | Commands commonly run at build time. This script does not need to be run separately. |
| `build:dir` | `electron-builder` directory build |
| `build:mac` | Build preconfigured packages for macOS |
| `build:linux` | Build preconfigured packages for Linux |
| `build:win` | Build preconfigured packages for Windows |
| `lint` | ESLint code inspection. It does not modify the code. |
| `lint:fix` | ESLint code inspection. Use auto-fix to fix your code. |
| `format` | Prettier code inspection. It does not modify the code. |
| `format:fix` | Prettier code inspection. Use auto-fix to fix your code. |
| `docs:install` | Install VitePress and related plugins for your local documentation environment. |
| `docs:dev` | Start the local document server. (For development) |
| `docs:build` | Build a local document server. Used only for GitHub page builders. |
| `docs:serve` | Start the local document server. |
+4 -2
View File
@@ -1,6 +1,8 @@
# Manage local documentation
# Manage Local Documentation
Documents from Vutron can be viewed in the local environment through the VitePress viewer.
Documents from `Vutron` can be viewed in the local environment through the VitePress viewer.
This function works only when the entire project is cloned. If you created the project with `npm init`, the `docs` folder is not included.
Since VitePress and related plugin packages are configured to be selectively installed, they cannot be installed with `npm i`.