mirror of
https://github.com/vale981/Vulcan
synced 2025-03-05 09:31:43 -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 vulcanPackageFile = fs.readFileSync(vulcanDirPath + 'package.json');
|
||||||
var vulcanPackageJson = JSON.parse(vulcanPackageFile);
|
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/';
|
var backupDirPath = vulcanDirPath + 'bkp/';
|
||||||
if (!fs.existsSync(backupDirPath)) {
|
if (!fs.existsSync(backupDirPath)) {
|
||||||
|
@ -63,6 +72,8 @@ if (!fs.existsSync(vulcanDirPath + 'package.json')) {
|
||||||
[vulcanDirPath]
|
[vulcanDirPath]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
updatedAppPackageJson.vulcanVersion = vulcanPackageJson.version;
|
||||||
|
|
||||||
[
|
[
|
||||||
'dependencies',
|
'dependencies',
|
||||||
'devDependencies',
|
'devDependencies',
|
||||||
|
|
Loading…
Add table
Reference in a new issue