neu cli for Neutralinojs
$ npm i -g @neutralinojs/neu
Synopsis
neu create myapp --template <templateName>
neu build
neu run
neu release
neu update
neu plugins [packageName] [--remove, --add]
Supported templates
Generic
- Javascript
--template js
- Typescript
--template ts
- Kotlin
--template kotlin
Frameworks/Libraries
- React
--template react
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 pluigns --add <packageName>
and it can be removed using,
$ neu plugins --remove <packageName>
MIT