<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                [TOC] ## 概述 1. 可以把 npm的命令行工具編譯成二進制 2. 可以把nodejs 的項目變成成二進制 ## 命令 ``` pkg [options] <input> Options: -h, --help output usage information -v, --version output pkg version -t, --targets comma-separated list of targets (see examples) -c, --config package.json or any json file with top-level config --options bake v8 options into executable to run with them on -o, --output output file name or template for several files --out-path path to save output one or more executables -d, --debug show more information during packaging process [off] -b, --build don't download prebuilt base binaries, build them --public speed up and disclose the sources of top-level project --public-packages force specified packages to be considered public --no-bytecode skip bytecode generation and include source files as plain js --no-native-build skip native addons build --no-dict comma-separated list of packages names to ignore dictionaries. Use --no-dict * to disable all dictionaries -C, --compress [default=None] compression algorithm = Brotli or GZip ``` example ``` – Makes executables for Linux, macOS and Windows $ pkg index.js – Takes package.json from cwd and follows 'bin' entry $ pkg . – Makes executable for particular target machine $ pkg -t node14-win-arm64 index.js – Makes executables for target machines of your choice $ pkg -t node12-linux,node14-linux,node14-win index.js – Bakes '--expose-gc' and '--max-heap-size=34' into executable $ pkg --options "expose-gc,max-heap-size=34" index.js – Consider packageA and packageB to be public $ pkg --public-packages "packageA,packageB" index.js – Consider all packages to be public $ pkg --public-packages "*" index.js – Bakes '--expose-gc' into executable $ pkg --options expose-gc index.js – reduce size of the data packed inside the executable with GZip $ pkg --compress GZip index.js ``` ## 示例 ### 把npm的命令編譯成二進制 ``` npm install -g json // 只編譯 arm版本 pkg -t node14-linux-arm64 /usr/local/bin/json ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看