diff --git a/README.md b/README.md index 0fb2d42..db5bf78 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ - [winget](https://github.com/microsoft/winget-cli) ## usage -- `bun i @grng/mix -g`, then `mix ` - - OR `bunx @grng/mix ` +- `bun i mix -g`, then `mix ` + - OR `bunx mix ` - `mix init` to create your mixfile & lock file - `mix sync` to install/remove/update/config packages \ No newline at end of file diff --git a/cmd/init.ts b/cmd/init.ts index 71aad9d..1f410d7 100644 --- a/cmd/init.ts +++ b/cmd/init.ts @@ -1,5 +1,5 @@ import type { Command } from "commander"; -import { existsSync, mkdirSync, readdirSync, writeFileSync } from "fs"; +import { readdirSync, writeFileSync } from "fs"; import * as h from "hjson"; import { homedir } from "os"; import path from "path"; @@ -15,12 +15,9 @@ 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: [] diff --git a/index.ts b/index.ts index f704ae7..9ac76c6 100644 --- a/index.ts +++ b/index.ts @@ -6,7 +6,7 @@ const program = new Command(); program .name('mix') .description('a declerative file-based package manager for windows.') - .version('0.0.5', '-v, --version', 'output the current version'); + .version('0.0.4', '-v, --version', 'output the current version'); registerCommands(program); program.parse(); \ No newline at end of file