Have ideas to improve npm?Join in the discussion! »

    @kintone/plugin-packer
    TypeScript icon, indicating that this package has built-in type declarations

    5.0.0 • Public • Published

    kintone-plugin-packer

    kintone plugin package.sh in JavaScript

    npm version

    It's written in pure JavaScript, so

    • The CLI works with Node.js in Mac/Windows/Linux
    • The web page works in any modern browsers
    • Validate your manifest.json with JSON Schema

    How to install

    $ npm install -g @kintone/plugin-packer

    Usage: CLI

    $ kintone-plugin-packer [OPTIONS] PLUGIN_DIR

    Options

    • --ppk PPK_FILE: The path of input private key file. If omitted, it is generated automatically into <Plugin ID>.ppk in the same directory of PLUGIN_DIR or --out if specified.
    • --out PLUGIN_FILE: The path of generated plugin file. The default is plugin.zip in the same directory of PLUGIN_DIR.
    • --watch, -w: Watch PLUGIN_DIR for the changes.

    How to use with npm run

    If your private key is ./private.ppk and the plugin directory is ./plugin, edit package.json:

    {
      "scripts": {
        "package": "kintone-plugin-packer --ppk private.ppk plugin"
      }
    }

    and then

    $ npm run package

    Usage: Node.js API

    const packer = require('@kintone/plugin-packer');
    const fs = require('fs');
    
    const buffer = createContentsZipBufferInYourSelf();
    packer(buffer).then(output => {
      console.log(output.id);
      fs.writeFileSync('./private.ppk', output.privateKey);
      fs.writeFileSync('./plugin.zip', output.plugin);
    });

    License

    MIT License

    Keywords

    Install

    npm i @kintone/plugin-packer

    DownloadsWeekly Downloads

    721

    Version

    5.0.0

    License

    MIT

    Unpacked Size

    68.7 kB

    Total Files

    40

    Last publish

    Collaborators

    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar