mirror of
https://github.com/vale981/Vulcan
synced 2025-03-04 17:21:37 -05:00
store current vulcanVersion in package.json
This commit is contained in:
parent
9cb5a6c1d4
commit
d948120e07
1 changed files with 12 additions and 1 deletions
|
@ -47,7 +47,16 @@ if (!fs.existsSync(vulcanDirPath + 'package.json')) {
|
|||
var vulcanPackageFile = fs.readFileSync(vulcanDirPath + 'package.json');
|
||||
var vulcanPackageJson = JSON.parse(vulcanPackageFile);
|
||||
|
||||
console.log(appPackageJson.name + '@' + appPackageJson.version + ' \'package.json\' will be updated with Vulcan@' + vulcanPackageJson.version + ' dependencies.');
|
||||
if (appPackageJson.vulcanVersion) {
|
||||
console.log(appPackageJson.name + '@' + appPackageJson.version +
|
||||
' \'package.json\' will be updated from Vulcan@' + appPackageJson.vulcanVersion +
|
||||
' to Vulcan@' + vulcanPackageJson.version +
|
||||
' dependencies.');
|
||||
} else {
|
||||
console.log(appPackageJson.name + '@' + appPackageJson.version +
|
||||
' \'package.json\' will be updated with Vulcan@' + vulcanPackageJson.version +
|
||||
' dependencies.');
|
||||
}
|
||||
|
||||
var backupDirPath = vulcanDirPath + 'bkp/';
|
||||
if (!fs.existsSync(backupDirPath)) {
|
||||
|
@ -63,6 +72,8 @@ if (!fs.existsSync(vulcanDirPath + 'package.json')) {
|
|||
[vulcanDirPath]
|
||||
);
|
||||
|
||||
updatedAppPackageJson.vulcanVersion = vulcanPackageJson.version;
|
||||
|
||||
[
|
||||
'dependencies',
|
||||
'devDependencies',
|
||||
|
|
Loading…
Add table
Reference in a new issue