Skip to content
This repository has been archived by the owner on Oct 17, 2022. It is now read-only.

Add support for passing arbitrary arguments #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ let defaultOptions = {
delimited: true, // 是否需要 delimited 方法
beautify: true, // 是否需要美化代码
comments: true, // 是否需要代码注释文档
convert: true // 是否需要 from/toObject
convert: true, // 是否需要 from/toObject
args: []
};
function ProtobufPlugin(options) {
this.options = options || {};
Expand Down Expand Up @@ -85,6 +86,9 @@ ProtobufPlugin.prototype.setBasicCommand = function () {
command.push('--no-' + key);
}
});
if (options.args !== undefined) {
command = command.concat(options.args);
}
this.command = command;
};

Expand Down