-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
572 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule excalidraw
added at
b7d7cc
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,6 +58,7 @@ | |
|
||
base-pkgs = with pkgs; [ | ||
bun | ||
yarn | ||
nodejs_latest | ||
pandoc | ||
pandoc-norg-rs.packages.${system}.default | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
import path from "node:path"; | ||
import { fileURLToPath } from "node:url"; | ||
import { spawnSync } from "node:child_process"; | ||
|
||
const __dirname = path.dirname(fileURLToPath(import.meta.url)); | ||
export const project_root = path.join(__dirname, ".."); | ||
|
||
const excalidrawDir = path.join(project_root, "excalidraw"); | ||
const excalidrawPkgDir = path.join(excalidrawDir, "src/packages/utils"); | ||
|
||
const gitRevCheck = spawnSync( | ||
"git", | ||
[ | ||
"apply", | ||
"--reverse", | ||
"--check", | ||
path.join(project_root, "excalidraw.patch"), | ||
], | ||
{ | ||
cwd: excalidrawDir, | ||
}, | ||
); | ||
|
||
if (gitRevCheck.status != 0) { | ||
spawnSync("git", ["apply", path.join(project_root, "excalidraw.patch")], { | ||
cwd: excalidrawDir, | ||
stdio: "inherit", | ||
}); | ||
} else { | ||
console.error("Excalidraw patch already applied"); | ||
} | ||
|
||
let res = spawnSync("yarn", ["--frozen-lockfile"], { | ||
stdio: "inherit", | ||
cwd: excalidrawDir, | ||
}); | ||
|
||
if (res.error) throw res.error; | ||
|
||
res = spawnSync("yarn", ["--frozen-lockfile"], { | ||
stdio: "inherit", | ||
cwd: excalidrawPkgDir, | ||
}); | ||
|
||
if (res.error) throw res.error; | ||
|
||
res = spawnSync("rm", ["-rf", "dist"], { | ||
stdio: "inherit", | ||
cwd: excalidrawPkgDir, | ||
}); | ||
|
||
if (res.error) throw res.error; | ||
|
||
res = spawnSync("yarn", ["run", "build:umd"], { | ||
stdio: "inherit", | ||
cwd: excalidrawPkgDir, | ||
env: { | ||
NODE_ENV: "production", | ||
}, | ||
}); | ||
|
||
if (res.error) throw res.error; | ||
|
||
res = spawnSync("bun", ["install", "--ignore-scripts", "--frozen-lockfile"], { | ||
stdio: "inherit", | ||
}); | ||
|
||
if (res.error) throw res.error; |