How can I add scripts to Angular.json from a folder with a changing folder name?

44 views Asked by At

I want to add multiple scripts contained in a downloaded folder to angular.json. The issue I'm facing is, that the scripts are generated by an external service and we just want to replace the folder containing the scripts in our project without changing any other configuration. Unfortunately the folders that contain the script and the scripts themselves are always generated with a different name than previously.

Is there a way to add all the .js files, that are contained in a specific folder to the scrips array in angular.json without providing the exact path?

Do you know any other approach to integrate the scripts dynamically?

We already thought about integrating them through a script injector service. That dynamically fetches all the scripts but we found this solution not to be good solution because it's kind of ugly.

0

There are 0 answers