Skip to content

Commit

Permalink
add version script
Browse files Browse the repository at this point in the history
  • Loading branch information
jcubic committed Sep 8, 2024
1 parent 74d4245 commit 32c7674
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"serve": "docusaurus serve",
"write-translations": "docusaurus write-translations",
"write-heading-ids": "docusaurus write-heading-ids",
"typecheck": "tsc"
"typecheck": "tsc",
"version": "node version.mjs"
},
"dependencies": {
"@docusaurus/core": "3.5.2",
Expand Down
6 changes: 6 additions & 0 deletions docs/version.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import fs from 'fs/promises';

fs.readFile('../package.json', 'utf8').then(json => {
const { version } = JSON.parse(json);
return fs.writeFile('version.json', JSON.stringify(version));
});

0 comments on commit 32c7674

Please sign in to comment.