Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add flag to ceylon doc to open the docs in the browser. #2057

Closed
FroMage opened this issue Feb 13, 2015 · 11 comments
Closed

Add flag to ceylon doc to open the docs in the browser. #2057

FroMage opened this issue Feb 13, 2015 · 11 comments

Comments

@FroMage
Copy link
Member

FroMage commented Feb 13, 2015

ceylon doc --browse com.foo should open a browser for the com.foo documentation. Probably it should also generate the docs, although it would be nice if it would also work for modules that are not even available locally. For example ceylon doc --browse ceylon.language would just open a browser either to Herd where the docs are, or fetch the docs locally and point the browser there. So details to be discussed but the general idea is to make it easier to browse docs from the CLI.

@tombentley
Copy link
Member

@thradec any thoughts about this? It's currently marked as 1.2 so if we're serious about that we should probably start working on it now, otherwise defer it till 1.3.

@FroMage
Copy link
Member Author

FroMage commented Mar 2, 2015

This should be quick to implement, that's why I marked it 1.2, but it can wait for 1.3 if it would take too long.

@thradec
Copy link
Member

thradec commented Mar 2, 2015

The implementation is no problem, at least for local modules. I just wonder, that there are people who prefer to use cli for opening browser on specific url :-).

@FroMage
Copy link
Member Author

FroMage commented Mar 2, 2015

Well, the use-case was as follows: using the CLI to get info on module with ceylon info com.foo/2 then I wanted to see the docs and I had to open a browser on Herd and type com.foo on the search and then click some more to find the docs.

The other use-case is after building the docs you want to check them: ceylon doc com.foo and then manually use completion many times to get to: chrome modules/com/foo/module-doc/index.html which is just lame.

@quintesse
Copy link
Member

I think it's definitely a good idea.
You have to think something like git commit --help opens a browser on Windows as well, and so do we now (fairly recent change).

And the docs are not really something you can easily show in the console, otherwise I'd suggest a --show option instead of a --browse.

@thradec
Copy link
Member

thradec commented Mar 2, 2015

ok, ok, it seems that I'm not so cli addicted as others :-)

@thradec
Copy link
Member

thradec commented Mar 2, 2015

support for browsing local modules is done via 1285dbc

@FroMage
Copy link
Member Author

FroMage commented Mar 2, 2015

OK that was indeed fast, thanks a lot :)

@thradec
Copy link
Member

thradec commented Mar 2, 2015

I'm not sure how to integrate this with modules that are not available locally, because now the doc command is described as "Generates Ceylon API documentation from Ceylon source files". Wouldn't be better to create new command for this use case, eg. browse-doc?

@FroMage
Copy link
Member Author

FroMage commented Mar 2, 2015

OK you're right, perhaps it makes sense to make this another command, but perhaps ceylon browse is enough for a name?

@thradec
Copy link
Member

thradec commented Mar 2, 2015

Done (for browse command opened separate issue #2079)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants