5

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.

edborden
  • 133
  • 9
  • Did you find a solution to this problem? I am having the similar issue and don't want to do it one by one at a time...Is it possible to use regex in app.import()? – yeelan Jun 02 '15 at 21:28

1 Answers1

1

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.

MrVinz
  • 874
  • 6
  • 15
  • 1
    As far as I know, this is only for copying static files, not including scripts... am I wrong? – edborden Dec 23 '14 at 23:31
  • 2
    OK, but I don't want to COPY the scripts, I want to include them into the my app's master minified JS file. – edborden Dec 23 '14 at 23:48