MacFJA / neutralinojs-cli

neu cli for Neutralinojs

Home Page:https://www.npmjs.com/package/@neutralinojs/neu

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

neutralinojs-cli

npm npm

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.

// 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.

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.

About

neu cli for Neutralinojs

https://www.npmjs.com/package/@neutralinojs/neu

License:MIT License


Languages

Language:JavaScript 100.0%