neutralinojs-cli
neu cli for Neutralinojs
$ npm i -g @neutralinojs/neu
Synopsis
neu create <binaryName>
neu build [--release]
neu run [--mode=<mode> --arch=<arch> --disable-auto-reload]
neu update
neu plugins [packageName] [--remove, --add]
neu version
Plugins
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 explained below.
Implementing the plugin
neu-cli
will register plugins using index.js
as an interface.
module.exports = {
command: 'commandname <action1>',
register: (command, modules) => {
command.option('--option1 --option2')
.action((action1, command) => {
});
}
}
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.
Publishing the plugin
Once you publish your neu-cli
plugin to npm registry, anyone will be able to use it using:
$ neu plugins --add <packageName>
and it can be removed using:
$ neu plugins --remove <packageName>
License
MIT
Contributors
Made with contributors-img.