status.im icon indicating copy to clipboard operation
status.im copied to clipboard

Share some JS across sites, reduce duplicity

Open samthomson opened this issue 7 years ago • 2 comments

For example, the JS to show/hide top navigation popup menus (community/projects) is replicated on each static site, but is the same. I expect there is more JS which could be clunked together in one shared asset. This would reduce the maintenance overhead and chance of bugs hanging around (eg. dev thinks they're fixed but hasn't fixed them everywhere..). I would like to look at the best way to do that. Likely with a static-sites-shared-js repo which could slot into the same sub-module pattern we've already set up. If assigned I'll see what works well and submit a PR.

samthomson avatar Nov 29 '18 09:11 samthomson

@andytudhope I think it should be possible to put shared JS in a shared repo to include as a submodule to each static site. Could you create a repo for this purpose (e.g. 'status.im-js' to be inline with the existing 'status.im-partials'). I could then push a shared js file (and read me), then update each respective static sites repo (gulp file, and existing js).

samthomson avatar Dec 03 '18 10:12 samthomson

Here you go @samthomson https://github.com/status-im/status-im-js ❤️

andytudhope avatar Dec 03 '18 11:12 andytudhope