Closed akhal3d96 closed 7 years ago
I wouldn't advise doing that, but if we want the user to serve this content form his machine I would prefer another general approach.
1- generate the template 2- if the user passed a key to the command like "--local-deps" to server dependencies from local machine 3- you post process the output to replace any script tag with src to be replaced the script tag with that src URL content 4- now that will work for both users that want deps local or from the internet and will work for all templates in the future and we will have a clean template in our repositories and also it'll be easier to update the template dependencies version as it's as easy as modifying the link in the script tag.
This seems good but about the local dependencies from the local machine approach, can't we just inject the source of the libraries instead of pointing to them locally? Either ways I want to implement this feature myself.
Yes that is the approach I feel better, replace the script tag to have the content inside the page not linked locally, just like you did in this PR but this should be done automatically via dirtree itself
This was made so that the gem functions properly even without internet access.