This repository has been archived on 2023-02-02. You can view files and clone it, but cannot push or open issues or pull requests.
mfgames-gallium-cil/BUILDING.md

49 lines
1.4 KiB
Markdown
Raw Normal View History

2021-11-19 03:46:48 +00:00
# Building
## Environment
To simplify environmental setup, this project uses the following:
2022-07-08 04:29:51 +00:00
- [Nix](https://nixos.org/)
- [direnv](https://direnv.net/)
2021-11-19 03:46:48 +00:00
Nix does not require the full NixOS (the operating system component), just a single- or multi-user setup. `direnv` is used to automatically configure the environment when entering the directory including setting up the needed PATH and other environment variables for the build.
### Working Without Nix
If not using Nix to set up the environment, look at `buildInputs` in [./shell.nix](./shell.nix) which includes the tools require for building (such as a specific version of Yarn, .NET Core, and the like).
`shell.nix` along with the data inside the `nix/` folder is considered the source of truth of dependencies and requirements for this project.
### Node and Yarn
Node is used as both the package metadata format (package version) and also build processes. We use [Husky]() to automatically set up Git hooks, [commitlint]() to ensure consistent check-ins that work with [semantic-release]() which automates the build process.
Setting up the environment consists of:
```
npm install
```
## Building
The preferred method for building is:
```
npm run build
```
This ensures everything is properly run. A short-cut can be to call the `dotnet build` directly.
```
dotnet build
```
## Testing
Again, the preferred method of testing is:
```
npm test
```