mirror of
https://github.com/LLOneBot/LLOneBot.git
synced 2024-11-22 01:56:33 +00:00
style: format
This commit is contained in:
@@ -1,20 +1,22 @@
|
||||
import fs from "fs";
|
||||
import path from"path";
|
||||
import {version} from "../src/version";
|
||||
const manifestPath = path.join(__dirname, "../manifest.json");
|
||||
function readManifest(): any{
|
||||
if (fs.existsSync(manifestPath)){
|
||||
return JSON.parse(fs.readFileSync(manifestPath, "utf-8"));
|
||||
import fs from 'fs'
|
||||
import path from 'path'
|
||||
import { version } from '../src/version'
|
||||
|
||||
const manifestPath = path.join(__dirname, '../manifest.json')
|
||||
|
||||
function readManifest (): any {
|
||||
if (fs.existsSync(manifestPath)) {
|
||||
return JSON.parse(fs.readFileSync(manifestPath, 'utf-8'))
|
||||
}
|
||||
}
|
||||
|
||||
function writeManifest(manifest: any){
|
||||
fs.writeFileSync(manifestPath, JSON.stringify(manifest, null, 2));
|
||||
function writeManifest (manifest: any) {
|
||||
fs.writeFileSync(manifestPath, JSON.stringify(manifest, null, 2))
|
||||
}
|
||||
|
||||
let manifest = readManifest();
|
||||
if (version !== manifest.version){
|
||||
manifest.version = version;
|
||||
manifest.name = `LLOneBot v${version}`;
|
||||
writeManifest(manifest);
|
||||
}
|
||||
const manifest = readManifest()
|
||||
if (version !== manifest.version) {
|
||||
manifest.version = version
|
||||
manifest.name = `LLOneBot v${version}`
|
||||
writeManifest(manifest)
|
||||
}
|
||||
|
Reference in New Issue
Block a user