Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Import many javascript files in a directory into Ember-CLI

If I have a repository in bower_components containing a folder with 50 JS files, I cannot include them one at a time in my Brocfile with app.import(). How do I include them all in the same call?

If I try to app.import an entire directory of js files, I get this error on compilation: You must pass a file to 'app.import'. For directories specify them to the constructor under the 'trees' option.

like image 728
edborden Avatar asked Nov 10 '22 21:11

edborden


1 Answers

what you are loocking for is the broccoli-static-compiler npm package which manage this perfectly, you can get it there : https://www.npmjs.com/package/broccoli-static-compiler and it's provieded with a nice documentation.

like image 157
MrVinz Avatar answered Jan 04 '23 03:01

MrVinz