0

I want to make Dart app that has flexible deployment. It can be started as a web server or standalone app in browser as well. My directory structure:

bin
- httpserver.dart 
lib
- commonlib.dart 
web
- web.html
- web.dart 
pubspec.yaml

I wanto start either httpserver.dart providing web's content or web.html directly in Chromium. I have troubles with the lib visibility from bin/httpserver.dart. using the "import 'package:prj/commonlib.dart'" does not work. But from the web.dart is works fine.

Please advice how to share libs among bin's and web's code. Or I should I make structure of dirs somehow different?

Note: there is no packages sub-dir in the bin directory created by pub get. I am using dart sdk 1.7.2.

Thank you, Ladislav.

Günter Zöchbauer
  • 623,577
  • 216
  • 2,003
  • 1,567
Skoky
  • 849
  • 1
  • 9
  • 15

1 Answers1

0

In the bin directory there should be a packages symlink created automatically but it is not in subdirectories of prj/bin. If the symlink isn't created just create it manually.

Günter Zöchbauer
  • 623,577
  • 216
  • 2,003
  • 1,567