Compare commits

...

2 commits

Author SHA1 Message Date
grngxd
4d1470de56 uhhh 2025-06-24 16:10:50 +01:00
grngxd
52128e9de0 fix docs commands 2025-06-24 16:08:48 +01:00
3 changed files with 9 additions and 6 deletions

View file

@ -11,7 +11,7 @@
- [winget](https://github.com/microsoft/winget-cli)
## usage
- `bun i mix -g`, then `mix <command> <args>`
- OR `bunx mix <command> <args>`
- `bun i @grng/mix -g`, then `mix <command> <args>`
- OR `bunx @grng/mix <command> <args>`
- `mix init` to create your mixfile & lock file
- `mix sync` to install/remove/update/config packages

View file

@ -1,5 +1,5 @@
import type { Command } from "commander";
import { readdirSync, writeFileSync } from "fs";
import { existsSync, mkdirSync, readdirSync, writeFileSync } from "fs";
import * as h from "hjson";
import { homedir } from "os";
import path from "path";
@ -15,9 +15,12 @@ export const registerInitCommand = (p: Command) => {
console.error("Error: Mix project already initialized. Please remove existing .mix.hjson or mix.lock files.");
process.exit(1);
}
// userhomedir/.mix/mix.hjson
const mixDir = isDev ? "" : path.join(homedir(), ".mix");
if (mixDir && !existsSync(mixDir)) {
mkdirSync(mixDir, { recursive: true });
}
writeFileSync(path.join(mixDir, "mix.hjson"), h.stringify({
default: {
packages: []

View file

@ -6,7 +6,7 @@ const program = new Command();
program
.name('mix')
.description('a declerative file-based package manager for windows.')
.version('0.0.4', '-v, --version', 'output the current version');
.version('0.0.5', '-v, --version', 'output the current version');
registerCommands(program);
program.parse();