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

pub build doesn't special-case the browser package when it is in dev_dependencies #16617

Closed
DartBot opened this issue Feb 7, 2014 · 5 comments
Assignees

Comments

@DartBot
Copy link

DartBot commented Feb 7, 2014

This issue was originally filed by dev...@futureperfect.info


1.2.0.edge_032404
Windows7x64

pubspec.yaml


name: bug
dev_dependencies:
  browser: '>=0.9.0'

example/test.dart


library bug.example;
import 'dart:html';
main() {
  document.body.append(new SpanElement()..text = 'Hello');
}

example/test.html


<!DOCTYPE html>
<html>
  <head>
    <title>Test</title>
  </head>
  <body>
    <script type="application/dart" src="test.dart"></script>
    <script src="packages/browser/dart.js"></script>
  </body>
</html>

cmd> pub build example

Notice there is no packages/dart.js or interop.js

Change the pubspec from dev_dependencies to dependencies et voila.

For a library package that has test/ and example/ but no application, it should be recommended to have browser in dev_dependencies to avoid unnecessary constraints on the consumer of the package, so I believe this needs to be fixed in order for pub build test and pub build example to be useful.

thanks

@lrhn
Copy link
Member

lrhn commented Feb 7, 2014

Added Area-Pub, Triaged labels.

@munificent
Copy link
Member

Added Started label.

@munificent
Copy link
Member

Set owner to @munificent.

@munificent
Copy link
Member

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

This issue has been moved to dart-lang/pub#849.

This issue was closed.
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

4 participants