0
votes

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.

1

1 Answers

0
votes

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.