javascript - Including source files in Cordova project from outside the project's directory hierarchy -


tl;dr: want include javascript files project in directory cordova project, without (manually) copying files cordova project directory tree. how?


i editing existing cordova project makes use of javascript source files written large web application project. currently, adding these source files copying them subdirectory of cordova project, , adding <script> tag relative path index.html file in cordova project. causes javascript files integrated in deployed app, apparently virtue of cordova's (or ionic's?) magic.

now, preferrable me avoid copying javascript files cordova project directory. instead, directly link files in original location rather copying them (so updates web application automatically applied cordova project, well).

as both cordova project , large web application reside in same vcs repository, relative path files same - sake of example, this:

|-repository/   |-web/   | |-src/   |   |-mycode.js   |-cordova     |-src       |-index.html       |-helpers         |-mycode.js // copy of /repository/web/src/mycode.js 

therefore, have tried setting relative path in aforementioned index.html file - unfortunately, cordova seems take on file verbatim, , thus, resulting url not exist (prompting 404 error in console, , causing code file unavailable).

how can have cordova include , reference files outside directory hierarchy of cordova project?

is there maybe @ least way have ionic or cordova automatically copy files cordova project directory upon building app?


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -