f
This commit is contained in:
parent
4d1470de56
commit
07e50ddc1e
3 changed files with 5 additions and 4 deletions
|
@ -12,7 +12,7 @@ export const registerSyncCommand = (p: Command) => {
|
|||
.command("sync")
|
||||
.action(() => {
|
||||
const getMixFiles = (): { name: string, content: MixFile}[] => {
|
||||
const files = readdirSync(process.cwd(), { withFileTypes: true })
|
||||
const files = readdirSync(isDev ? process.cwd() : homedir(), { withFileTypes: true })
|
||||
.filter((dirent) => dirent.isFile() && dirent.name.endsWith("mix.hjson") && !dirent.name.startsWith("_"))
|
||||
.map((dirent) => ({
|
||||
name: dirent.name,
|
||||
|
@ -50,7 +50,8 @@ export const registerSyncCommand = (p: Command) => {
|
|||
}
|
||||
|
||||
const getLockFile = (): MixLockFile => {
|
||||
return h.parse(readFileSync("mix.lock", "utf-8"));
|
||||
const mixDir = isDev ? "" : path.join(homedir(), ".mix");
|
||||
return h.parse(readFileSync(path.join(mixDir, "mix.lock"), "utf-8"));
|
||||
}
|
||||
|
||||
const diff = (file: MixFile, lock: MixLockFile) => {
|
||||
|
|
2
index.ts
2
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.6', '-v, --version', 'output the current version');
|
||||
|
||||
registerCommands(program);
|
||||
program.parse();
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@grng/mix",
|
||||
"version": "0.0.4",
|
||||
"version": "0.0.6",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue