Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Allow single to multiple #9

Open
rhessinger opened this issue Jan 16, 2015 · 5 comments
Open

Allow single to multiple #9

rhessinger opened this issue Jan 16, 2015 · 5 comments

Comments

@rhessinger
Copy link

It would be awesome if it could take one script and have it load multiple scripts. The situation i have found is that i use Web Grease bundling with javascript and it would be nice to make my bundle actually load multiple files when using imposter.

@gotdibbs
Copy link
Owner

@rhessinger That's a good idea. Not sure if I'll have time to get to it soon but you're welcome to take a stab at it and submit a PR OR you could replace your one script file with a loader script which would tackle appending all the necessary script tags to the DOM.

@rhessinger
Copy link
Author

Thanks for the suggestion, I will take a look and see what i can do myself.

@gotdibbs
Copy link
Owner

Sure thing. Let me know if I can help with the script loader. I've done that a couple times.

To be clear, you wouldn't need to append the entire script, just a script tag with a source URL that Imposter is set to respond to.

@rhessinger
Copy link
Author

@gotdibbs So I was taking a look at this over the weekend and my thought was to basically generate a script loader dynamically from the mapped files and write the response as a stream back through fiddler, which then should scan the directory to find the scripts. The idea would be to add a flag to the overrides that states if this should use a script loader and then include the files in the path box separated by commas. What are your thoughts on that? I was also thinking to add the file picker in so you can use a multi-select for files to get the paths to add ease of use.

@gotdibbs
Copy link
Owner

@rhessinger Sorry for the delay! I think some more complex UI may be required. I was originally thinking a multi-select file picker would be perfect, but then I remembered you might actually care about the order by which the files are concatenated together. Feel free to take a stab at whatever works for you though and I'll take a look.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants