Fuse/scripts/bump-docs.cjs
An Phi 98366b1630 fix: add proper ESM exports in package.json
Co-authored-by: An Phi <aphi@skidmore.edu>
2023-10-23 19:32:49 -07:00

22 lines
495 B
JavaScript

//Load the library and specify options
const replace = require('replace-in-file')
const pckg = require('../package.json')
const VERSION = process.env.VERSION || pckg.version
const options = {
files: './docs/getting-started/installation.md',
from: /(\d+\.)(\d+\.)(\d+)/g,
to: VERSION
}
async function bump() {
try {
const results = await replace(options)
console.log('Replacement results:', results)
} catch (error) {
console.error('Error occurred:', error)
}
}
bump()