From 65655bbc03937cd2e8cbfce16035edabdeeba01f Mon Sep 17 00:00:00 2001 From: leejooy96 Date: Tue, 1 Nov 2022 11:40:48 +0900 Subject: [PATCH] docs: typo fix and add npm scripts document --- docs/2-build-configuration.md | 4 ++-- docs/3-npm-scripts.md | 21 +++++++++++++++++++++ docs/install-local-documentation.md | 6 ++++-- 3 files changed, 27 insertions(+), 4 deletions(-) create mode 100644 docs/3-npm-scripts.md diff --git a/docs/2-build-configuration.md b/docs/2-build-configuration.md index b51c019..b327c83 100644 --- a/docs/2-build-configuration.md +++ b/docs/2-build-configuration.md @@ -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. diff --git a/docs/3-npm-scripts.md b/docs/3-npm-scripts.md new file mode 100644 index 0000000..b7a79fd --- /dev/null +++ b/docs/3-npm-scripts.md @@ -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. | diff --git a/docs/install-local-documentation.md b/docs/install-local-documentation.md index 3880832..d40e73d 100644 --- a/docs/install-local-documentation.md +++ b/docs/install-local-documentation.md @@ -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`.