balena-io-modules / resin-plugin-hello

Learn the basics of Resin CLI plugin development

Repository from Github https://github.combalena-io-modules/resin-plugin-helloRepository from Github https://github.combalena-io-modules/resin-plugin-hello

resin-plugin-hello

npm version

Hey there, welcome to the Resin CLI hello plugin!

This plugin serves many purposes:

  • As a Resin CLI plugin example.
  • As a tutorial, in order to learn the basics of Resin CLI plugin development.
  • As a boilerplate to build your own plugin.

Tutorial

The index.js file contains annotations that serve as a basic Resin CLI plugin development tutorial. Check this file if you want to learn how to develop your first Resin CLI plugin.

Package.json

Make sure that you name your plugin as resin-plugin-<plugin-name> in your package.json otherwise the CLI will not load it.

Examples of well-formed plugin names:

  • resin-plugin-hey-there
  • resin-plugin-my-kickass-plugin

Examples of ill-formed plugin names:

  • resin-hey-there
  • my-resin-cli-plugin

Installing

If you install a Resin CLI plugin as a global module, it will be loaded by the Resin CLI automagically.

From NPM

$ npm install -g resin-plugin-hello

From git

$ npm install -g git+https://git@github.com/resin-io/resin-plugin-hello.git

Developing

A nice trick to ease your development workflow is npm link. This command creates a symbolic link from your local plugin source directory to the global module location in your system, causing changes to your plugin to be reflected on the fly by the Resin CLI.

Example:

$ cd resin-plugin-hello
$ npm link
$ resin hello Juan --exclamate
Hey there Juan!!!

Learn more

We're working hard to provide more extensive documentation. In the midtime, take a look at Capitano as most of the most powerful features come from it.

CoffeeScript

You can develop your plugins with CoffeeScript. Just make sure you compile to JavaScript and point the main field in your package.json to your compiled JavaScript file.

Support

If you're having any problem, please raise an issue on GitHub.

License

The project is licensed under the MIT license.

About

Learn the basics of Resin CLI plugin development

License:MIT License


Languages

Language:JavaScript 100.0%