Created
March 31, 2020 00:37
-
-
Save timothycarambat/9cd9fc054df6ac0bd312cda3e2390c63 to your computer and use it in GitHub Desktop.
Package.json - update version number - no SVN. Made for discord user.
This file contains hidden or 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
const fs = require('fs'); | |
const fileName = './package.json'; | |
const file = require(fileName); | |
const currentVersion = file.version ? +file.version : 0 | |
file.version = String(currentVersion + 1) | |
fs.writeFile(fileName, JSON.stringify(file,null,2), function writeJSON(err) { | |
if (err) return console.log(err); | |
console.log(JSON.stringify(file ,null,2)); | |
console.log('writing to package.json'); | |
}); |
This file contains hidden or 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
{ | |
"name": "", | |
"version": "3", | |
"dependencies": { | |
"fs": "0.0.1-security" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment