Import many javascript files into a directory in 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 to include them all in the same call?

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

+5
source share
1 answer

what you are trying to find is the npm broccoli-static-compiler package that does a great job of this, you can get it there: https://www.npmjs.com/package/broccoli-static-compiler and this proves good documentation.

+1
source

Source: https://habr.com/ru/post/1209803/


All Articles