neu cli for Neutralinojs
$ npm i -g @neutralinojs/neu
Synopsis
neu create <binaryName>
neu build [--release]
neu run [--mode=<mode>]
neu listen [--mode=<mode>]
neu update
neu plugins [packageName] [--remove, --add]
neu version
Neutralinojs app developers are able to write custom neu-cli
plugins to add their own commands to the main CLI. Plugins can be developed as per below.
neu-cli
will register plugins using index.js
as an interface.
// index.js
module.exports = {
command: 'commandname <action1>',
register: (command, modules) => {
command.option('--option1 --option2')
.action((action1, command) => {
//your logic goes here..
});
}
}
command
is the cli command string with actions. register
will be called when plugin is being registered with neu-cli
. Thus, it has the command object and standard modules object as parameters. Please check commander for more information about commands and objects.
Once you publish your neu-cli
plugin to npm directory anyone will be able to use it using,
$ neu plugins --add <packageName>
and it can be removed using,
$ neu plugins --remove <packageName>
Made with contributors-img.