You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

11 lines
339 B

const path = require('path')
const fs = require('fs')
const pkg = require('../../simple-mind-map/package.json')
const file = path.resolve('../simple-mind-map/full.js')
let content = fs.readFileSync(file, 'utf-8')
content = content.replace(
/(MindMap.version\s*=\s*)[^\n]+(\n)/,
`$1'${pkg.version}'$2`
)
fs.writeFileSync(file, content)