Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70429

Is it possible to configure Ionic to copy custom JS files to the dist folder?

$
0
0

@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 using ionic 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 and ionic.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 of scripts (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 or ionic-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

Read full topic


Viewing all articles
Browse latest Browse all 70429

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>