-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from Mimickal/api-tweaks
Add docs, refactor code a bit, bug fixes
- Loading branch information
Showing
7 changed files
with
2,874 additions
and
389 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// This is not strictly part of the library. This is just a janky script that | ||
// bumps the release version and regenerates code docs. | ||
const fs = require('fs'); | ||
const shell = require('child_process').execSync; | ||
|
||
const newversion = process.argv[2]; | ||
if (!newversion) { | ||
console.error('Missing version!'); | ||
process.exit(1); | ||
} | ||
|
||
function updateVersionForFile(file) { | ||
const file_json = require(`../${file}`); | ||
file_json.version = newversion; | ||
fs.writeFileSync(file, JSON.stringify(file_json, null, 2)); | ||
console.log(`Wrote version ${newversion} to ${file}`); | ||
} | ||
|
||
updateVersionForFile('package.json'); | ||
updateVersionForFile('package-lock.json'); | ||
|
||
shell('npm run regen-docs'); | ||
console.log('Wrote out new API.md'); | ||
|
||
shell('git add package.json package-lock.json API.md'); | ||
shell(`git commit -m "Version bump to ${newversion}, regen docs"`); | ||
|
Oops, something went wrong.