Skip to content

Document how to use PubGlobal #248

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

Open
zoechi opened this issue May 21, 2015 · 3 comments
Open

Document how to use PubGlobal #248

zoechi opened this issue May 21, 2015 · 3 comments

Comments

@zoechi
Copy link

zoechi commented May 21, 2015

I tried to activate a path package but PubApp.global() seems not to support it.
Whith PubGlobals API this would be quite easy but I can't create an instance.

There also seems no way to make use of _sdkBin to rebuild the inaccessible features in an easy way outside of Grinder.

I find it quite confusing that this class is public but can't be used.

@zoechi
Copy link
Author

zoechi commented May 21, 2015

I found out that Pub.global returns an instance of PubGlobal.
I still think this is confusing. Autocompletion shows PubGlobal and it looks inviting for the task at hand, but I can't use it because it has a private constructor.

The doc of PubGlobal says

/// Access the pub global commands.

And I would like to do something like this return run_lib.run(_sdkBin('pub'), arguments: args, runOptions: runOptions); myself, but can't because _sdkBin is private.

Is there a reason _sdkBin is private?

What can be done to reduce the confusion about PubGlobal?

  • move the class to another file (inside src where its not directly exported)
  • add documentation that points to Pub.global

@seaneagan seaneagan changed the title PubGlobal should have a public constructor Document how to use PubGlobal May 21, 2015
@seaneagan
Copy link
Contributor

Activating a path package is tracked in #165.

_sdkBin would be exposed via #204 as sdk.bin.

I agree we should document in PubGlobal that it is used via pub.global (renaming this issue to match).

@zoechi
Copy link
Author

zoechi commented May 21, 2015

Sounds great!

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

No branches or pull requests

2 participants