问题
In the Polymer Starter Kit, every reference to the bower_components subdirectory refers to a node just below the app directory. However, (at least in my version of PSK) the bower_components subdirectory is one level up from the app directory. In other words, the bower_components subdirectory is actually located in the project root directory.
Am I just miscounting my directory nodes? Or does this have something to do with how gulp and maybe vulcanize work? Or is it something else altogether that I'm not understanding?
For example, in index.html there is this script tag:
<script src="bower_components/webcomponentsjs/webcomponents-lite.js"></script>
which suggests the bower_components directory is at the same level as index.html. But it's not. bower_components is actually one level up.
Same for element imports.
回答1:
Compilation of responses from Polymer Slack Site:
Response #1:Response #2:yeah, gulp basically builds everything into a build and the web server serves the build folder instead of the project. I don’t remember what’s the name of the build folder in starter kit in particular, but for most project it works as I described
it’s specific to PSK. The local server mounts that directory and serves it as if it were inside
app. I just sent in a PR to change this because it’s confusing
来源:https://stackoverflow.com/questions/34142722/understanding-polymer-1-x-polymer-starter-kit-file-structure-as-it-relates-to-bo