Discussion:
[dart-misc] How does a package "use" `pub run`?
'Samuel Rawlins' via Dart Misc
2018-10-26 17:31:47 UTC
Permalink
The package-layout documentation:

https://www.dartlang.org/tools/pub/package-layout

includes the following under Public tools
<https://www.dartlang.org/tools/pub/package-layout#public-tools>:

Dart scripts placed inside of the bin directory are public. Any package
that depends on your package can run scripts from your package’s bin
directory using pub run. *Any* package can run scripts from your package’s
bin directory using pub global.


How does a package "use" `pub run` or "use" `pub global`? Is there some
Dart API for `pub run`ning something? I'm guessing this is a semantic
mistake. I think the author meant to write something like:

A user executing pub from within a package which depends on your package
can run scripts from your package's bin directory using pub run.


(emphasis on *user*) and

A user executing pub from any directory can run scripts from your package's
bin directory using pub global.


Is this correct? Should I file a bug? A better writer than me could
probably do it with less than 4 prepositional phrases :)
--
For more ways to connect visit https://www.dartlang.org/community
---
You received this message because you are subscribed to the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.
To view this discussion on the web visit https://groups.google.com/a/dartlang.org/d/msgid/misc/CACshfx2neQUKAgF2dL5hcvrLwnQGwAXOovinnNA6sXUA-dp1eA%40mail.gmail.com.
'Bob Nystrom' via Dart Misc
2018-10-26 17:47:52 UTC
Permalink
On Fri, Oct 26, 2018 at 10:31 AM, 'Samuel Rawlins' via Dart Misc <
Post by 'Samuel Rawlins' via Dart Misc
https://www.dartlang.org/tools/pub/package-layout
includes the following under Public tools
Dart scripts placed inside of the bin directory are public. Any package
that depends on your package can run scripts from your package’s bin
directory using pub run. *Any* package can run scripts from your
package’s bin directory using pub global.
How does a package "use" `pub run` or "use" `pub global`? Is there some
Dart API for `pub run`ning something? I'm guessing this is a semantic
A user executing pub from within a package which depends on your package
can run scripts from your package's bin directory using pub run.
(emphasis on *user*) and
A user executing pub from any directory can run scripts from your
package's bin directory using pub global.
Is this correct? Should I file a bug? A better writer than me could
probably do it with less than 4 prepositional phrases :)
Yeah, those are both correct, but also a mouthful. :)

How about:

If you're inside the directory of a package, you can use "pub run" to run
scripts from the bin directories of any other package the package depends
on.

From *any* directory, you can use "pub global run" to run scripts from
packages you have activated using "pub global activate".


?

– bob
--
For more ways to connect visit https://www.dartlang.org/community
---
You received this message because you are subscribed to the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.
To view this discussion on the web visit https://groups.google.com/a/dartlang.org/d/msgid/misc/CAF8T8Lx6gzN_vt1iN27D7z8edMarcUmjXEwR14bkTZPpQzu9Nw%40mail.gmail.com.
'Samuel Rawlins' via Dart Misc
2018-10-26 18:35:40 UTC
Permalink
Done! https://github.com/dart-lang/site-www/pull/1210

On Fri, Oct 26, 2018 at 10:48 AM 'Bob Nystrom' via Dart Misc <
Post by 'Bob Nystrom' via Dart Misc
On Fri, Oct 26, 2018 at 10:31 AM, 'Samuel Rawlins' via Dart Misc <
Post by 'Samuel Rawlins' via Dart Misc
https://www.dartlang.org/tools/pub/package-layout
includes the following under Public tools
Dart scripts placed inside of the bin directory are public. Any package
that depends on your package can run scripts from your package’s bin
directory using pub run. *Any* package can run scripts from your
package’s bin directory using pub global.
How does a package "use" `pub run` or "use" `pub global`? Is there some
Dart API for `pub run`ning something? I'm guessing this is a semantic
A user executing pub from within a package which depends on your package
can run scripts from your package's bin directory using pub run.
(emphasis on *user*) and
A user executing pub from any directory can run scripts from your
package's bin directory using pub global.
Is this correct? Should I file a bug? A better writer than me could
probably do it with less than 4 prepositional phrases :)
Yeah, those are both correct, but also a mouthful. :)
If you're inside the directory of a package, you can use "pub run" to run
scripts from the bin directories of any other package the package depends
on.
From *any* directory, you can use "pub global run" to run scripts from
packages you have activated using "pub global activate".
?
– bob
--
For more ways to connect visit https://www.dartlang.org/community
---
You received this message because you are subscribed to the Google Groups
"Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an
To view this discussion on the web visit
https://groups.google.com/a/dartlang.org/d/msgid/misc/CAF8T8Lx6gzN_vt1iN27D7z8edMarcUmjXEwR14bkTZPpQzu9Nw%40mail.gmail.com
<https://groups.google.com/a/dartlang.org/d/msgid/misc/CAF8T8Lx6gzN_vt1iN27D7z8edMarcUmjXEwR14bkTZPpQzu9Nw%40mail.gmail.com?utm_medium=email&utm_source=footer>
.
--
For more ways to connect visit https://www.dartlang.org/community
---
You received this message because you are subscribed to the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.
To view this discussion on the web visit https://groups.google.com/a/dartlang.org/d/msgid/misc/CACshfx33x8q7-%2BgZz8DTmaNf5BFpqbRW7n%2B-GyAcu4Zb47D-GQ%40mail.gmail.com.
Continue reading on narkive:
Loading...