Hi,
Create a seperate application. Include the required js files in the application. Now suppose you want to create main ag-grid, then add an blank webblock where you can send input parameters those are required for your js. In the web block loading time may be in preparation, try to render the script required and use your parameters in js. Now you can drag this webblock to another application and use it.
I had a same requirement for ag-grid. We did that in same way. We created different different web blocks for different type of columns. This is same like your requirement. I will share some screenshots for the process we followed.
Thanks
Sourav