48c6feaf75
* chore: check on installation type now as single module * feat(Reload notification): added support for after-install notification * feat(Reload notification): added support never show again notification
16 lines
574 B
TypeScript
16 lines
574 B
TypeScript
import * as path from 'path';
|
|
import {getDefaultValues, getPackageJSON, writeFile} from './fs';
|
|
|
|
import {IDefaults} from './../interfaces/idefaults';
|
|
|
|
const writeDefaults = (defaults: IDefaults) =>
|
|
writeFile(path.join('./extensions/defaults.json'), JSON.stringify(defaults, null, 2));
|
|
|
|
export default (): void => {
|
|
const defaults = getDefaultValues();
|
|
const packageJSON = getPackageJSON();
|
|
|
|
const newChangelog = {...defaults.changelog, lastversion: packageJSON.version};
|
|
const newDefaults = {...defaults, changelog: newChangelog};
|
|
writeDefaults(newDefaults);
|
|
};
|