Skip to content

Commit

Permalink
feat(docs): ✨ Pulling version number from helia.
Browse files Browse the repository at this point in the history
Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com>
  • Loading branch information
whizzzkid committed Oct 24, 2023
1 parent 43932a5 commit c777d83
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@
"release": "run-s build docs:no-publish npm:release docs",
"npm:release": "aegir exec --bail false npm -- publish",
"release:rc": "aegir release-rc",
"docs": "NODE_OPTIONS=--max_old_space_size=8192 aegir docs -- --exclude packages/interop --excludeExternals",
"docs:no-publish": "NODE_OPTIONS=--max_old_space_size=8192 aegir docs --publish false -- --exclude packages/interop"
"update:version": "node scripts/update-version.js",
"docs": "npm run update:version && NODE_OPTIONS=--max_old_space_size=8192 aegir docs -- --exclude packages/interop --excludeExternals",
"docs:no-publish": "npm run update:version && NODE_OPTIONS=--max_old_space_size=8192 aegir docs --publish false -- --exclude packages/interop"
},
"devDependencies": {
"aegir": "^41.0.0",
Expand Down
6 changes: 6 additions & 0 deletions scripts/update-version.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import heliaPkg from '../packages/helia/package.json' assert { type: 'json'}
import rootPkg from '../package.json' assert { type: 'json'}
import { writeFile } from 'fs/promises'

rootPkg.version = heliaPkg.version
await writeFile(new URL('../package.json', import.meta.url), `${JSON.stringify(rootPkg, null, 2)}\n`)

0 comments on commit c777d83

Please sign in to comment.