项目作者: ionic-team

项目描述 :
Create a new Capacitor plugin ⚡️
高级语言: Mustache
项目地址: git://github.com/ionic-team/create-capacitor-plugin.git
创建时间: 2020-08-21T22:27:26Z
项目社区:https://github.com/ionic-team/create-capacitor-plugin

开源协议:Other

下载


Create Capacitor Plugin

Generate a new Capacitor plugin.

Usage

  1. npm init @capacitor/plugin [<path>] [options]

:memo: npm init <pkg> requires npm 6+

You can also try the following methods to use this package:

Example Apps

As of the 0.8.0 release, example apps for testing are included when initializing a new plugin. To use these templates, you can open the npx cap open android or npx cap open ios command for Android and iOS respectively. Anything in the example-app folder will be excluded when publishing to npm.

Options

  1. --name <name> ............. npm package name (e.g. "capacitor-plugin-example")
  2. --package-id <id> ......... Unique plugin ID in reverse-DNS notation (e.g. "com.mycompany.plugins.example")
  3. --class-name <name> ....... Plugin class name (e.g. "Example")
  4. --repo <url> .............. URL to git repository (e.g. "https://github.com/example/repo")
  5. --author <author> ......... Author name and email (e.g. "Name <name@example.com>")
  6. --license <id> ............ SPDX License ID (e.g. "MIT")
  7. --description <text> ...... Short description of plugin features