用gulp任务执行nexe编译

时间:2019-05-31 10:38:55

标签: node.js gulp

有人可以建议如何通过gulp任务执行nexe编译吗?我写了简单的gilpfile.hs文件。如何在其中添加nexe.compile()?

https://www.npmjs.com/package/nexe

const gulp = require("gulp");
const ts = require("gulp-typescript");
const nexe = require("nexe");

const target = {
    folder: "target",
    js: "index.js",
    exe: "index.exe"
};

gulp.task("build", function () {
    return gulp.src("src/**/*.ts")
    .pipe(ts({ outFile: target.js }))
    .pipe(nexe.compile()) // What write here?
    .pipe(gulp.dest(target.folder));
});

1 个答案:

答案 0 :(得分:0)

Nexe没有直接的gulp支持-因此它不适用于文件流。 但它基于承诺-因此您可以运行指向实际文件路径。

想法是-在将打字稿编译为js之后,使用该Sub testRep2() Dim sht As Worksheet Dim findStr As String Dim repStr As String Dim start As Long Dim startSheet As Long findStr = "Foo" repStr = "Bar" Application.ScreenUpdating = False Application.DisplayStatusBar = False start = timer For Each sht In ActiveWorkbook.Worksheets startSheet = timer With sht.PageSetup .LeftHeader = VBA.Replace(.LeftHeader, findStr, repStr) .CenterHeader = VBA.Replace(.CenterHeader, findStr, repStr) .RightHeader = VBA.Replace(.RightHeader, findStr, repStr) End With Debug.Print sht.Name, timer - startSheet Next sht Debug.Print "Total:", timer - start Application.DisplayStatusBar = True Application.ScreenUpdating = True End Sub Sheet1 (5) 0.796875 Sheet1 (4) 0.34765625 Sheet1 (3) 0.89453125 Sheet1 (2) 0.42578125 Sheet1 0.96875 Total: 2.96875 文件运行nexe构建-

尝试关注

target.js