Docs: Getting commands from external script to show up in `help`
See original GitHub issueWe’ve developed a Hubot script for integration with a time-tracking service.
It worked great, but for one thing: the commands doesn’t show up.
After digging around in the Hubot source, I realized that my project structure was to blame:
// `tsheets.coffee` loaded files from `lib`
| lib
| package.son
| tsheets.coffee
Appearantly, the structure has to be something along the lines of:
// `tsheets.coffee` loaded from `index.coffee`
| src (maybe works with other name as long as index.coffee loads file)
|_ tsheets.coffee
| index.coffee
If this is a requirement for things to work, you might want to clarify it in the docs. 😃
Thanks for a great product.
Issue Analytics
- State:
- Created 9 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Get-Help (Microsoft.PowerShell.Core) - Microsoft Learn
The Get-Help cmdlet displays information about PowerShell concepts and commands, including cmdlets, functions, Common Information Model (CIM) commands, ...
Read more >Execute write on doc: It isn't possible to write into a document ...
Execute write on doc: It isn't possible to write into a document from an asynchronously-loaded external script unless it is explicitly opened. ·...
Read more >Extending Google Docs | Apps Script
Google Apps Script allows you to programmatically create and modify Google Docs, as well as customize the user interface with new menus, ...
Read more >The Script element - HTML: HyperText Markup Language
Scripts with the defer attribute will execute in the order in which they appear in the document. This attribute allows the elimination of ......
Read more >Basic Features: Handling Scripts - Next.js
Note: Once a next/script component has been loaded by the browser, it will stay in the DOM and client-side navigations won't re-execute the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
For what its worth, I just had this problem myself - trying to get my external script package to register its documentation. To be clear I had no problem getting the package working, just had no idea how hubot might search for documentation in packages (it doesn’t).
The simplest solution for me seems to be to make my main file export nothing more then a simple function which will call
robot.loadFile
on the actual entrypoint to the package, so that the documentation gets parsed.It’d be nice if this were a little clearer in the documentation. Additionally perhaps hubot should parse the modules main file, or have some way of locating a packages documentation through properties on project.json or similar?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.