Recommended Dart project layout for public, privat

2019-02-25 09:26发布

问题:

What is the recommended Dart project layout if I have both app (client) and server code as well as private lib resources and test files?

回答1:

The project layout shared by Dan Rubel and Eric Clayberg (in a presentation at the 2013-12-18 Googleplex Eclipse Day) is something like this:

my_app/
  pubspec.yaml
  README.md
  bin/
    start_my_app             <-- server-side code
  lib/
    public_code.dart         <-- shared public code
    src/
      internal_code.dart     <-- private code
  test/
    my_app_test.dart
  web/                       <-- client-side code
    index.html
    main.dart
    main.css


标签: dart