| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent f151425 commit dd848be
4 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -20,7 +20,7 @@ | |||
| 20 | 20 | "rollout-doc": "cd documentation && pnpm build && pnpm deploy", | |
| 21 | 21 | "docs": "typedoc", | |
| 22 | 22 | "--comment_postinstall": "postinstall executed after package installed in other project package and when we do pnpm i in the package", | |
| 23 | - "postinstall": "node -e \"const fs=require('fs');const path=require('path');const spaPath=path.join(__dirname,'dist','spa');if(fs.existsSync(spaPath) && !process.env.PNPM_INSTALL_SPA){process.env.PNPM_INSTALL_SPA=1;require('child_process').execSync('pnpm install --frozen-lockfile',{cwd:spaPath,stdio:'inherit'});console.log('installed spa dependencies');}\"" | ||
| 23 | + "postinstall": "node scripts/postinstall.js" | ||
| 24 | 24 | }, | |
| 25 | 25 | "release": { | |
| 26 | 26 | "plugins": [ | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,25 @@ | |||
| 1 | + import fs from 'node:fs'; | ||
| 2 | + import path from 'node:path'; | ||
| 3 | + import { fileURLToPath } from 'node:url'; | ||
| 4 | + | ||
| 5 | + const nodeBinary = process.execPath; | ||
| 6 | + const __filename = fileURLToPath(import.meta.url); | ||
| 7 | + const __dirname = path.dirname(__filename); | ||
| 8 | + const spaPath=path.join(__dirname,'dist','spa'); | ||
| 9 | + | ||
| 10 | + const pnpmPotentionalPath=path.join(nodeBinary,'..','pnpm'); | ||
| 11 | + const doesUserProjectHasPnpm = fs.existsSync(pnpmPotentionalPath) | ||
| 12 | + console.log('doesUserProjectHasPnpm', doesUserProjectHasPnpm); | ||
| 13 | + if (doesUserProjectHasPnpm) { | ||
| 14 | + if(fs.existsSync(spaPath) && !process.env.PNPM_INSTALL_SPA){ | ||
| 15 | + process.env.PNPM_INSTALL_SPA=1; | ||
| 16 | + require('child_process').execSync('pnpm install --frozen-lockfile',{cwd:spaPath,stdio:'inherit'}); | ||
| 17 | + } | ||
| 18 | + } else { | ||
| 19 | + if(fs.existsSync(spaPath)){ | ||
| 20 | + process.chdir(spaPath); | ||
| 21 | + require('child_process').execSync('npm ci',{stdio:'inherit'}); | ||
| 22 | + } | ||
| 23 | + } | ||
| 24 | + | ||
| 25 | + console.log('installed spa dependencies'); | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments