@iignatov wrote:
I've created a custom JS file in a Ionic2 TypeScript project, located in
/app/scripts
, and I want it copied to the/build/js
automatically when usingionic serve
. This is probably a simple task but I couldn't find any information or an example on how to achieve it. Then I decided to make some experiments andionic.config.js
seemed the logical place to start so I added the following code:// ... paths: { // ... scripts: { src: ['app/scripts/**/*.js'], dest: 'www/build/js' }, // ... watch: { // ... scripts: ['app/scripts/**/*.js'], // ... } }, // ...
However, this doesn't seem to work. I also tried with
js
instead ofscripts
(as I saw in some partial code pieces I found) but it didn't work either. I don't know where to find the code which processes this configuration file (ionic
orionic-cli
or ??? - any clues are welcome) so I have no idea how to configure it properly.I'm also not sure if it's possible to do this only with configuration or I have to create a custom gulp task for it, so I hope that someone can give me a hint.
Posts: 1
Participants: 1