On 11/4/16, 2:13 AM, "carlos.rov...@gmail.com on behalf of Carlos Rovira" <carlos.rov...@gmail.com on behalf of carlos.rov...@codeoscopic.com> wrote:
>I think Chris is on the track on this issue. > >As a user, If I have a resource on a folder, is because I want it on final >output, so I'll expect to be copied, since output folder is what I'll be >putting on server (and not any source code related resource). > >btw, I think this should be IDE agnostic, and it scares me if we think it >should depend on that. people should be able to use it from command line, >so I think this is in the flexjs sdk domain. > >In traditional flex development: > >* I used a path like this "/assets/image.jpg" and that would work as an >absolute path. From my experience, a leading slash only worked in IDEs and did not work from the command line. >* The other way is relative to the resource, without the first slash, and >you can up and down the hierarchy starting from the source file in which >you write that code. > >I use a maven style folder structure (so src/main/flex/App.mxml and so >on), >other will use src/App.mxml... we need to support all of this in a easy >way, since this is basic. > >I think If users start to be kept in this basic things, is what could make >them to not continue trying flexjs. > Somehow, I think everybody on this email list was able to use the regular Flex SDK and manage their resources without the Flex SDK MXMLC compiler having any ability to copy resources. So I really am curious as to how folks managed resources in the past. That said, I'm fine with having the compiler look in a few places to find and copy assets. Currently, only certain kinds of files are copied from an assets folder that is a sibling of the main class file's location. If we add src/main/resources, should you have to specify a relative path to it? I think not, since the relative path would affect the layout in the target folder, so maybe the developer will have to specify a second source path for src/main/resources. Thoughts? -Alex