refactor: fix typescript errors
This commit is contained in:
@@ -2,7 +2,7 @@ import fs from "fs";
|
||||
import fse from "fs-extra";
|
||||
import gulp from "gulp";
|
||||
import deb from "gulp-debian";
|
||||
import template from "lodash.template";
|
||||
import { template } from "lodash";
|
||||
import os from "os";
|
||||
import path from "path";
|
||||
import { Config } from "../../../../core/config";
|
||||
@@ -21,7 +21,7 @@ export class LinuxDEBPacker extends Packer {
|
||||
const buildDir = path.join(os.tmpdir(), "build", this.config.name, "debian");
|
||||
const iconfile = `${this.config.meta.filename}${path.extname(this.config.meta.icon!)}`;
|
||||
const desktopTemplate = template(
|
||||
fs.readFileSync(path.resolve(import.meta.dirname, "..", "template/linux/app.desktop")),
|
||||
fs.readFileSync(path.resolve(import.meta.dirname, "..", "template/linux/app.desktop"), "utf8"),
|
||||
);
|
||||
const desktop = desktopTemplate(Object.assign({ iconfile: iconfile }, this.config));
|
||||
fse.ensureDirSync(`${buildDir}/usr/share/applications`);
|
||||
@@ -30,8 +30,8 @@ export class LinuxDEBPacker extends Packer {
|
||||
fse.copySync(this.config.meta.icon!, `${buildDir}/usr/share/${this.config.meta.filename}/${iconfile}`);
|
||||
return gulp.src(`${buildDir}/*`).pipe(
|
||||
deb({
|
||||
package: this.config.meta.filename,
|
||||
version: this.config.meta.version,
|
||||
package: this.config.meta.filename!,
|
||||
version: this.config.meta.version!,
|
||||
section: "base",
|
||||
priority: "optional",
|
||||
architecture: "all",
|
||||
|
||||
Reference in New Issue
Block a user