question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Docs: Getting commands from external script to show up in `help`

See original GitHub issue

We’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:closed
  • Created 9 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
opticalcommented, Nov 2, 2015

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?

0reactions
stale[bot]commented, May 30, 2017

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found