0.10.1 • Published 8 years ago
@teppeis/kintone-plugin-packer v0.10.1
kintone-plugin-packer
kintone plugin package.sh in JavaScript
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.jsonwith JSON Schema
How to install
$ npm install -g @teppeis/kintone-plugin-packerUsage: CLI
$ kintone-plugin-packer [OPTIONS] PLUGIN_DIROptions
--ppk PPK_FILE: The path of input private key file. If omitted, it is generated automatically into<Plugin ID>.ppkin the same directory ofPLUGIN_DIRor--outif specified.--out PLUGIN_FILE: The path of generated plugin file. The default isplugin.zipin the same directory ofPLUGIN_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 packageUsage: Node.js API
const packer = require('@teppeis/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: Teppei Sato <teppeis@gmail.com>