chore: add command for updating master.zig on windows (#859)
This commit is contained in:
parent
61c0981294
commit
faee213658
@ -48,6 +48,13 @@ zig build -Drelease-safe
|
|||||||
There is a `generate-data.py` in the `src/data` folder, run this file to update data files.
|
There is a `generate-data.py` in the `src/data` folder, run this file to update data files.
|
||||||
It writes to stdout and you can redirect output to a zig file like `master.zig`. By default it generates data file for `master`, but can be configured to generate for a different version by modifying the `zig_version` variable. Files generated by this tool **contains** formatting information.
|
It writes to stdout and you can redirect output to a zig file like `master.zig`. By default it generates data file for `master`, but can be configured to generate for a different version by modifying the `zig_version` variable. Files generated by this tool **contains** formatting information.
|
||||||
|
|
||||||
|
On Powershell 5.1 (the default Powershell on Windows 10 & 11), the following will update `master.zig`.
|
||||||
|
```pwsh
|
||||||
|
New-Item -Force .\src\data\master.zig -Value ((python .\src\data\generate-data.py) -split "`r?`n" -join "`n")
|
||||||
|
```
|
||||||
|
|
||||||
|
This unweidly command is necesary in order to guarantee Unix-style line endings and UTF-8 text encoding.
|
||||||
|
|
||||||
There is also a `generate-data.js` in the `src/data` folder, you'll need to run this inside a Chrome DevTools console and copy the output. Files generated by this tool **does not contain** formatting information.
|
There is also a `generate-data.js` in the `src/data` folder, you'll need to run this inside a Chrome DevTools console and copy the output. Files generated by this tool **does not contain** formatting information.
|
||||||
|
|
||||||
### Configuration Options
|
### Configuration Options
|
||||||
|
Loading…
Reference in New Issue
Block a user