Closed akhal3d96 closed 7 years ago
Okay I wrote this in exe/dirtree
file but I have no idea why the output html file doesn't work!
if options[:local_dependencies]
scripts = result.scan(/(<script src="(.+)"><\/script>)/)
script_t = scripts.transpose
script_t[0].each do |script|
src = script_t[1].shift
result.gsub!(script,"<script>#{open(src).read}</script>")
end
end
The browser's console says there's something wrong with the jQuery snippet but I can't seem to find it. Help me senpai ðŸ˜.
1- use named group in your regular expression to get the src
value
2- don't care about the browser console. open the output file and see what's written there if it's ok then look at the browser console.
You just drop the JavaScript libraries in the
js
directory and the gem will automatically load them when called with-l
argument, l for local.