@porky-prince/protobuf

1.1.0 • Public • Published

protobuf

Protocol buffers for H5 game

Reference

@egret/protobuf

Feature

  • protobuf.js, protobuf.d.ts and pbconfig.json will be added to your project automatically after the package was installed
  • support node >= 12

Install

Local

npm:

$ npm install --save @porky-prince/protobuf

yarn:

$ yarn add @porky-prince/protobuf

Global

npm:

$ npm install -g @porky-prince/protobuf

yarn:

$ yarn add global @porky-prince/protobuf

Usage

Using in code

const protobuf = require('@porky-prince/protobuf');

async function run() {
	await protobuf.add(projectRoot, true);
	await protobuf.generate(projectRoot);
}

Command line usage

First, you have to install the dependency package globally

$ porky-pb <command>

example:

$ porky-pb generate you-project-root

Command line options

  add [options] <projectRoot>       add protobuf.js, protobuf.d.ts and pbconfig.json to
                          your project
  generate <projectRoot>  generate bundle.js and bundle.d.ts to your project
                          by proto files
  help [command]          display help for command

License

MIT © PorkyKay

/@porky-prince/protobuf/

    Package Sidebar

    Install

    npm i @porky-prince/protobuf

    Weekly Downloads

    1

    Version

    1.1.0

    License

    MIT

    Unpacked Size

    16.8 kB

    Total Files

    6

    Last publish

    Collaborators

    • porky-prince