Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/typescript/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Node.js 如何打包节点webkit应用程序_Node.js_Webkit_Node Webkit - Fatal编程技术网

Node.js 如何打包节点webkit应用程序

Node.js 如何打包节点webkit应用程序,node.js,webkit,node-webkit,Node.js,Webkit,Node Webkit,我正在开发我的第一个节点webkit应用程序。我对打包文件感到困惑。最终产品是可以执行的单个文件吗 The end result will not be a single executable, you must also include some DLLs in your zip-file. github中的这些行让我更加困惑 包装是怎么做的 我是否需要将webkit文件也包含在包中,还是只包含我创建的文件 我使用下面的gulp脚本成功地为各种平台打包了我的node webkit应用程序

我正在开发我的第一个节点webkit应用程序。我对打包文件感到困惑。最终产品是可以执行的单个文件吗

The end result will not be a single executable, you must also include some DLLs in your zip-file. 
github中的这些行让我更加困惑

  • 包装是怎么做的
  • 我是否需要将webkit文件也包含在包中,还是只包含我创建的文件

我使用下面的gulp脚本成功地为各种平台打包了我的node webkit应用程序。下面是一个不言自明的脚本

参考:

将文件另存为
gulpFile.js
。在终端中,只需在与gulpFile.js相同的位置运行gulp命令,它将下载平台所需的节点webkit发行版,并为您构建包

var NwBuilder = require('nw-builder');
var gulp = require('gulp');
var gutil = require('gulp-util');

gulp.task('nw', function () {

    var nw = new NwBuilder({
        version: '0.12.3',
        files: '../nodepoc/**',
        platforms: ['osx64','win32','win64']

    });

    // Log stuff you want
    nw.on('log', function (msg) {
        gutil.log('nw-builder', msg);
    });

    // Build returns a promise, return it so the task isn't called in parallel
    return nw.build().catch(function (err) {
        gutil.log('nw-builder', err);
    });
});

gulp.task('default', ['nw']);