fix(Layout): avoid ESM JSON import by piping Node script; normalize build/package.json safely
Some checks failed
armco-org/Layout/pipeline/head There was a failure building this commit
Some checks failed
armco-org/Layout/pipeline/head There was a failure building this commit
This commit is contained in:
@@ -8,9 +8,10 @@ npm run build
|
||||
cp package.json build/
|
||||
|
||||
# Use Node.js for portable package.json normalization
|
||||
node <<'EOF' "$(pwd)/build/package.json"
|
||||
# Pass the target path via env var to avoid Node treating it as a module/script argument
|
||||
PKG_PATH="$(pwd)/build/package.json" node - <<'EOF'
|
||||
const fs = require('fs');
|
||||
const path = process.argv[1];
|
||||
const path = process.env.PKG_PATH;
|
||||
const pkg = JSON.parse(fs.readFileSync(path, 'utf8'));
|
||||
pkg.private = false;
|
||||
delete pkg.scripts;
|
||||
|
||||
Reference in New Issue
Block a user