From f37bf6b48a78ac2ca923a090549d23c6fcb12fb6 Mon Sep 17 00:00:00 2001 From: codetypes Date: Mon, 17 Mar 2025 14:17:23 +0800 Subject: [PATCH] init submodule on npm install --- package.json | 2 +- pre-commit.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 5af9e11..84a669f 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ }, "scripts": { "tsc-check": "tsc --noEmit", - "postinstall": "tsx pre-commit.ts", + "postinstall": "git submodule update --init --recursive && tsx pre-commit.ts", "dev": "vite", "build": "tsc && vite build && electron-builder", "preview": "vite preview", diff --git a/pre-commit.ts b/pre-commit.ts index 5eab657..cad56f1 100644 --- a/pre-commit.ts +++ b/pre-commit.ts @@ -1,4 +1,4 @@ -import * as fs from "node:fs"; +import * as fs from "fs"; const hooks = ` #!/bin/sh