update build guide for pnpm

This commit is contained in:
Linden committed 2022-07-05 03:04:05 +10:00
1 parent a007b4c987
commit f62086e11f
1 file changed
+9 -9
+9 -9
View File
@@ -8,11 +8,11 @@ import {FaNodeJs} from 'react-icons/fa'
## Requirements to build: ## Requirements to build:
* Node.js * Node.js
* Yarn * pnpm
## Installing Node.js: ## Installing Node.js:
* Download the LTS version of Node.js. * Download the LTS version of Node.js 16.
* Go through the install and make sure you install all of the features. * Go through the install and make sure you install all of the features.
* Run `node --version` in cmd and make sure that it gives you the version number. If it doesn't then you didn't install it correctly. * Run `node --version` in cmd and make sure that it gives you the version number. If it doesn't then you didn't install it correctly.
@@ -22,20 +22,20 @@ import {FaNodeJs} from 'react-icons/fa'
</a> </a>
</div> </div>
## Installing Yarn: ## Installing pnpm:
* Now that you've installed Node.js you can install Yarn by running `npm install --global yarn` in cmd. * Now that you've installed Node.js you can install pnpm by running `npm install -g pnpm` in cmd.
## Building the UI: ## Building the UI:
* cd into the web directory of ox_inventory * cd into the web directory of ox_inventory
* In your cmd type `yarn` and in will start downloading the node modules. * In your cmd type `pnpm i` and it will start downloading the node modules.
* After it's done downloading node modules you can run `yarn build` to build the UI. * After it's done downloading node modules you can run `pnpm build` to build the UI.
:::info Hot reloads :::info Hot reloads
When working in the browser you can run `yarn start`, which supports hot reloads meaning that When working in the browser you can run `pnpm start`, which supports hot reloads meaning that
you will see your changes after saving your file. you will see your changes after saving your file.
If you want to work in game you can run `yarn start:game` which writes changes to disk, so If you want to work in game you can run `pnpm start:game` which writes changes to disk, so
the only thing you have to do is restart the resource for it take affect. the only thing you have to do is restart the resource for it take affect.
::: :::