I am trying to understand Dart's recommended project structure and not seeing the "forest through the trees".
So, if my project is intended to be a reusable library, say, a logging framework of some sort, then if I understand the above link correctly, I want all of my development to be under a lib and lib/src directory.
But what if I am building a web app? Where do my Dart source files go? Under packages? Specifically:
- Where do I place Dart source files for a web app (not a lib)?
- Are my web app's "packages" just directories that are logically organized similar to Java packages?
- Does Dart recommend a 1-class-per-file convention for its source code?
1)
static content like jpg, css go to * your_app_package/asset
2) the packages directory is maintained automatically. You configure in the file
pubspec.yamlwhich 3rd party libraries you want to use and then callpub getorpub upgradeand thepackagesdirectory is updated automatically (the Darteditor does this automatically when you updatepubspec.yaml).3) not that I know of.
I had some problems putting additional classed in the code file of a Polymer element though. But I guess this is just a temporary limitation of Polymer.