Add multiple files in a packages with api.addFiles


#1

This is what i’d like to achieve :

api.addFiles( [
	'components/**/*.*',
], 'client' );

But it appear to be not supported. Have you ever encountered something like that ? I currently import twenty-like files and this is ugly to name them one by one :smile:


#2

Unfortunately, the current api does not allow that. You can’t do javascript processing (FS) of the directory tree to build file names either.


#3

Well, this is unfortunate.

I see how to do it the way you suggest, but it would be heavier than just writing my file list.

Thank you anyway !


#4

This is the only possibility I’ve come across: https://github.com/dcsan/meteor-reactive-ace/blob/master/package.js#L44-L59

Honestly though, I’d just add them manually, gives you more control as well.