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.
 
 
 

14 lines
438 B

const fs = require('fs');
const { version } = require('../package.json');
const sourcePath = __dirname + '/../src/jquery.rss.js';
const lines = fs.readFileSync(sourcePath).toString().split('\n');
const updatedLines = lines.map((line) => {
if (!line.includes('// Synced version')) {
return line;
}
return ` this.version = '${version}'; // Synced version`
});
fs.writeFileSync(sourcePath, updatedLines.join('\n'));