diff --git a/src/generators/adaptor.js b/src/generators/adaptor.js index a685079..acfbd0e 100644 --- a/src/generators/adaptor.js +++ b/src/generators/adaptor.js @@ -50,6 +50,7 @@ var generateTemplateData = function() { return { adaptorName: cylonAdaptorName(), adaptorClassName: adaptorClassName(), + basename: String(adaptorName).toLowerCase(), cylonVersion: pkg.version }; } diff --git a/src/generators/adaptor/README.md.tpl b/src/generators/adaptor/README.md.tpl index 02d493b..97bc5be 100644 --- a/src/generators/adaptor/README.md.tpl +++ b/src/generators/adaptor/README.md.tpl @@ -13,18 +13,43 @@ sister project Gobot (http://gobot.io). For more information about Cylon, check out our repo at https://github.com/hybridgroup/cylon -## Installing +## Getting Started - npm install <%= adaptorName %> +Install the module with: `npm install <%= adaptorName %>` -## Using - -```coffeescript -# your example code here... -``` +## Examples ## Connecting +### JavaScript + +```javascript +var Cylon = require('cylon'); + +Cylon.robot({ + connection: { name: '<%= basename %>', adaptor: '<%= basename %>' }, + device: {name: '<%= basename %>', driver: '<%= basename %>'}, + + work: function(my) { + // provide an example of your module here + } +}).start(); +``` + +### CoffeeScript + +``` +Cylon = require 'cylon' + +Cylon.robot + device: { name: '<%= basename %>', driver: '<%= basename %>' } + connection: { name: '<%= basename %>', adaptor: '<%= basename %>' } + work: (my) -> + # provide an example of your module here + +.start() +``` + Explain how to connect from the computer to the device here... ## Contributing @@ -39,4 +64,4 @@ None yet... ## License -Copyright (c) 2013 Your Name Here. See `LICENSE` for more details +Copyright (c) 2014 Your Name Here. See `LICENSE` for more details