This package has been deprecated

Author message:

@koba04/webpack-plugin-kintone-plugin has been transfered to @kintone/webpack-plugin-kintone-plugin

@koba04/webpack-plugin-kintone-plugin

0.3.4 • Public • Published

webpack-plugin-kintone-plugin

npm version CircleCI Build status

A webpack plugin to create a plugin zip of kintone.

Usage

'use strict';

const path = require('path');
const KintonePlugin = require('@koba04/webpack-plugin-kintone-plugin');

module.exports = {
  entry: {
    desktop: './src/desktop.js',
    mobile: './src/mobile.js'
  },
  output: {
    path: path.resolve(__dirname, 'plugin', 'js'),
    filename: '[name].js'
  },
  plugins: [
    new KintonePlugin({
      manifestJSONPath: './plugin/manifest.json',
      privateKeyPath: './private.ppk',
      pluginZipPath: './dist/plugin.zip'
    })
  ]
};

The settings is the following structure.

  • src/desktop.js is an entry point of desktop javascript.
  • src/mobild.js is an entry point of desktop javascript.
  • plugin is the directory of the plugin, which includes manifest.json and other resources.
  • private.ppk is the private key for the plugin
  • dist/plugin.zip is the plugin zip file.

Install

npm install @koba04/webpack-plugin-kintone-plugin

Options

You can customize the paths of manifest.json, privateKey and plugin zip. Those default values are like the following.

manifestJSONPath: './manifest.json',
privateKeyPath: './private.ppk',
pluginZipPath: './dist/plugin.zip'

If you want to customize these values, you can update the values like this.

'use strict';

const path = require('path');
const KintonePlugin = require('@koba04/webpack-plugin-kintone-plugin');

module.exports = {
  entry: {
    desktop: './src/desktop.js',
    mobile: './src/mobile.js'
  },
  output: {
    path: path.resolve(__dirname, 'plugin', 'js'),
    filename: '[name].js'
  },
  plugins: [
    new KintonePlugin({
      manifestJSONPath: './plugin/manifest.json',
      privateKeyPath: './private.ppk',
      pluginZipPath: './dist/plugin.zip'
    })
  ]
};

In addition to that, you can specify the plugin zip name based on the plugin id and values of the manifest.json.

plugins: [
  new KintonePlugin({
    manifestJSONPath: './plugin/manifest.json',
    privateKeyPath: './private.ppk',
    pluginZipPath: (id, manifest) => `${id}.${manifest.version}.plugin.zip`
  })
];

License

MIT License: Toru Kobayashi

Readme

Keywords

Package Sidebar

Install

npm i @koba04/webpack-plugin-kintone-plugin

Weekly Downloads

0

Version

0.3.4

License

MIT

Unpacked Size

12.8 kB

Total Files

7

Last publish

Collaborators

  • koba04