From 6001b9c9872699f36f2750aa4e5ba4dcc2b34c1d Mon Sep 17 00:00:00 2001 From: Linden <65407488+thelindat@users.noreply.github.com> Date: Mon, 22 May 2023 18:03:47 +1000 Subject: [PATCH] add general guides --- docs/guides/_category_.yml | 6 ++++++ docs/guides/git.md | 8 ++++++++ docs/guides/nodejs.md | 7 +++++++ docs/guides/pnpm.md | 22 ++++++++++++++++++++++ 4 files changed, 43 insertions(+) create mode 100644 docs/guides/_category_.yml create mode 100644 docs/guides/git.md create mode 100644 docs/guides/nodejs.md create mode 100644 docs/guides/pnpm.md diff --git a/docs/guides/_category_.yml b/docs/guides/_category_.yml new file mode 100644 index 00000000..91c45d2d --- /dev/null +++ b/docs/guides/_category_.yml @@ -0,0 +1,6 @@ +label: Guides +collapsible: true +collapsed: true +link: + type: generated-index +position: 1.5 diff --git a/docs/guides/git.md b/docs/guides/git.md new file mode 100644 index 00000000..d98c4a61 --- /dev/null +++ b/docs/guides/git.md @@ -0,0 +1,8 @@ +# Git + +Git is a version control system, allowing changes to be effectively tracked, merged, and reverted. + +As our resources are hosted on GitHub, it can be incredibly useful to learn how to create your own repository to track changes and keep up-to-date. If you plan on making your own changes to our resources, this will allow you to keep your own changes and prevent loss of data. + +- Refer to [GitHub's guide to setting up Git](https://docs.github.com/en/get-started/quickstart/set-up-git#setting-up-git). +- You can also download a Git GUI client, such as [GitKraken](https://www.gitkraken.com/), to improve your workflow and more easily maintain changes. diff --git a/docs/guides/nodejs.md b/docs/guides/nodejs.md new file mode 100644 index 00000000..e7b779cb --- /dev/null +++ b/docs/guides/nodejs.md @@ -0,0 +1,7 @@ +# Node.js + +Node.js is a JavaScript runtime and is used for building applications. In the context of FiveM it is necessary to bundle resources into a single package that can be ran on both the server and client. + +- [Download](https://nodejs.org) and install the LTS version of Node.js. +- Open a command-line terminal (e.g. Terminal, Command Prompt). +- Enter `node --version` to confirm successful installation. diff --git a/docs/guides/pnpm.md b/docs/guides/pnpm.md new file mode 100644 index 00000000..3b79b2c2 --- /dev/null +++ b/docs/guides/pnpm.md @@ -0,0 +1,22 @@ +# pnpm + +pnpm is a fast and disk space efficient package manager, serving as an alternative to npm and yarn. + +- Ensure you have [installed Node.js](./nodejs.md). +- Open a command-line terminal (e.g. Terminal, Command Prompt). +- Enter `npm install -g pnpm` to globally install the package. +- You can install dependencies with pnpm using `pnpm i`. + +You can reference `package.json` files for available scripts, i.e. + +```json +"scripts": { + "start": "vite", + "watch": "vite build --watch", + "build": "tsc && vite build", + "preview": "vite preview", + "format": "prettier --write \"./src/**/*.{ts,tsx,css}\"" +}, +``` + +Using the example above `pnpm build` will run the build script for the given package.