Compare commits

..

5 commits
v2.0.0 ... main

6 changed files with 411 additions and 366 deletions

View file

@ -1,4 +1,4 @@
![horizr](https://github.com/horizr/art/raw/main/horizr-banner.jpg) ![horizr](./banner.png)
# horizr CLI # horizr CLI
![npm](https://img.shields.io/npm/v/@horizr/cli?color=white&label=latest%20version&logoColor=red&style=flat-square) ![npm](https://img.shields.io/npm/v/@horizr/cli?color=white&label=latest%20version&logoColor=red&style=flat-square)
@ -15,7 +15,7 @@
## Usage ## Usage
Because both [pkg](https://github.com/vercel/pkg) and [nexe](https://github.com/nexe/nexe) dont support ES modules at the time of writing, Because both [pkg](https://github.com/vercel/pkg) and [nexe](https://github.com/nexe/nexe) dont support ES modules at the time of writing,
I cant publish executable files. I cant publish executable files.
The only way of installing is therefore `npm`. The only way of installing is therefore `npm`.
@ -28,7 +28,6 @@ Run any command with the `-h` flag to see the available options.
A new pack can be initialized using `horizr init <path>`. A new pack can be initialized using `horizr init <path>`.
## Contributing ## Contributing
I developed this tool primarily for my own packs, thats why its missing some features I didnt absolutely need. I developed this tool primarily for my own packs, thats why its missing some features I didnt absolutely need.
Nevertheless, if you want a feature added, feel free to [create an issue](https://github.com/horizr/cli/issues/new). Nevertheless, if you want a feature added, feel free to [create an issue](https://github.com/horizr/cli/issues/new).
@ -38,3 +37,4 @@ Features I have in mind:
- List disabled source files - List disabled source files
- Allow disabling static source files by adding `.disabled` to their name - Allow disabling static source files by adding `.disabled` to their name
- Import packwiz packs - Import packwiz packs
- Hot-reloading `packwiz dev` command

BIN
banner.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View file

@ -1,6 +1,6 @@
{ {
"name": "@horizr/cli", "name": "@horizr/cli",
"version": "2.0.0", "version": "2.0.1",
"main": "./dist/main.js", "main": "./dist/main.js",
"type": "module", "type": "module",
"license": "MIT", "license": "MIT",
@ -12,7 +12,7 @@
"check": "tsc --noEmit" "check": "tsc --noEmit"
}, },
"bin": { "bin": {
"horizr": "bin/horizr.js" "horizr": "./bin/horizr.js"
}, },
"files": [ "files": [
"dist", "dist",

762
pnpm-lock.yaml generated

File diff suppressed because it is too large Load diff

View file

@ -67,6 +67,7 @@ export const activateCommand = new Command("activate")
await fs.mkdirp(absolutePath.parent().toString()) await fs.mkdirp(absolutePath.parent().toString())
await writeJsonFile(absolutePath, metaFileContentSchema, { await writeJsonFile(absolutePath, metaFileContentSchema, {
displayName: modrinthMod.title,
formatVersion: FORMAT_VERSION, formatVersion: FORMAT_VERSION,
enabled: true, enabled: true,
version: getMetaFileContentVersionForModrinth(modrinthVersion), version: getMetaFileContentVersionForModrinth(modrinthVersion),

View file

@ -8,9 +8,9 @@ import { IndexedFile, PACKWIZ_EXPORT_DIRECTORY_NAME, writeAndIndexMetaFile, writ
export const exportCommand = new Command("export") export const exportCommand = new Command("export")
.description("Export a packwiz pack.") .description("Export a packwiz pack.")
.option("-s, --server", "Use server overrides instead of client overrides. Only applies to static files.") .option("-s, --server", "Use server overrides instead of client overrides. Only applies to static files.")
.action(async (path, options) => { .action(async (path, command) => {
const pack = await usePack() const pack = await usePack()
const side: Side = options.server ? "server" : "client" const side: Side = command.opts().server ? "server" : "client"
const loader = output.startLoading("Exporting") const loader = output.startLoading("Exporting")
const outputDirectoryPath = pack.paths.exports.resolve(PACKWIZ_EXPORT_DIRECTORY_NAME) const outputDirectoryPath = pack.paths.exports.resolve(PACKWIZ_EXPORT_DIRECTORY_NAME)