mirror of
https://github.com/heavyai/heavyai-charting.git
synced 2026-01-18 14:53:19 +00:00
* Script to only run npm-force-resolutions if building as stand-alone * Ensure scripts folder is included in build --------- Co-authored-by: Chris Matzenbach <chris.matzenbach@omnisci.com>
15 lines
518 B
JavaScript
15 lines
518 B
JavaScript
const fs = require("fs")
|
|
const path = require("path")
|
|
|
|
// Check if current directory has a package-lock.json (i.e., is a root project)
|
|
const lockPath = path.resolve(process.cwd(), "package-lock.json")
|
|
|
|
if (fs.existsSync(lockPath)) {
|
|
// We're in the project root, safe to run
|
|
const { execSync } = require("child_process")
|
|
console.log("Running npm-force-resolutions...")
|
|
execSync("npx npm-force-resolutions", { stdio: "inherit" })
|
|
} else {
|
|
console.log("Skipping npm-force-resolutions (not in project root)")
|
|
}
|