dotjs
dotjs copied to clipboard
Also serve CSS & images, auto-load CSS
Hi Chris,
As discussed in https://github.com/defunkt/dotjs/pull/44 you're open to serving CSS & images but prefer a different location.
In this patch, CSS is served from ~/.js/css and images from ~/.jss/images. I've also updated the Chrome extension to auto-load CSS upon page load. No longer does one need to JS to insert style tags.
I hope you'll accept this patch and merge it in. It would also close https://github.com/defunkt/dotjs/pull/44.
Cheers,
@bartt
i would be a fan of this!
Why not ~/.js/asssets or ~/.js/static?
+1
+1
is this going to be merged?
+1
I think css should be served from ~/.css and images from ~/.images or the extension base directory should be renamed to ~/.dotjs
Good point.
I implemented this on my fork (https://github.com/fuadsaud/dotjs/tree/dev). The behaviour differs a little, but the idea is the same. I put up some specs to and everything seems to be working fine. I'd appreciate if anyone would help with testing it.
See stewart/dotcss
If this get merged, please replace the .js directory with .dotjs and put there 3 folders called 'js', 'css' and 'images'. Would be the prettiest? :+1: for the Idea!