Consolidate code and conditional build #191
Merged
Conversation
* This just-about works on Firefox; need to do build environment variables next, and a lot of clean-up. It's a mess for any browser other than Firefox. Also the code that represents the entry points should be named appropriately (e.g. '_content.js'?) and all of the filenames need looking at. Finally, the names of exports should be looked at---should they be hardcoded, or default? * Updated tests to use rollup-generated test code (much simpler; very neat and easy :-)). * Had to disable linting the build/ dir afterwards (due to semicolons etc.); would like to re-enable that.
* This ignores and removes certain scripts. In future it would be neater for them to be generated and go directly to their build directories, rather than stop over in src/static/. * Also ensure rollup is run before a quick or a normal build.
* Set open_at_install on the sidebar to false, so that the starting state is always known (need to use this approach until isOpen() is fixed to propogate user input blessedness for event handling). * Set minimum required Firefox version to 62 as required (partly addresses #190). * Use Firefox Developer Edition for testing (due to the requirement for Firefox 62). * Also open the Browser Console by default when using web-ext.
* Update deps. * Update build script to use the plugin. * Test the plugin in the code. This appears to've uncovered a bug with terser: terser/terser#92
* Thanks for the help on terser/terser#92 :-)
* Remove loadsa script inclusions from manifests. * Create cross-browser compatibility script and import. * Create cross-browser specialPages script and import. * Remove now-defo-unused code from build script. * Increase terser compress passes to two to avoid dangling strings.
* Factor out Logger. * Give all default exports their names back. * Remove redundant ".js" suffixes from imports. * Remove options-change logging (debugging info). * Rename contrast.js to contrastChecker.js to reflect name.
* Reinstate the content script injector. This always has to be imported, but can return null on Firefox. * Set terser's `conditionals` compressor option so that simple tests for one browser can be filtered out.
Alas the output after rollup and terser was a bit wonky. Experimenting with two spaces for now, as whilst I doubt it will be sufficiently readable, it might take up less space in browser inspector windows, so may be good; will see...
* Remove interface defaultSettings from Chrome and Edge. * Remove debugging info.
* Remvoe some but not all debugging things; trying to figure out why Opera is not showing the browserAction toolbar button sometimes.
@@ -210,6 +210,7 @@ Changes | |||
- 2.4.0 - in development | |||
- Show the current keyboard commands on the splash page and allow the user to update them on Chrome and Opera. \[[\#187](https://github.com/matatk/landmarks/pull/187)\] | |||
- Offer an optional sidebar instead of the pop-up on Firefox and Opera. \[[\#188](https://github.com/matatk/landmarks/pull/188)\] | |||
- Massive re-organisation of the code to make it easier to manage and accommodate and take advantage of cross-browser differences. \[[\#191](https://github.com/matatk/landmarks/pull/191)\] |
MarkWithall
Aug 6, 2018
This seems to have a tab, whereas the rest has spaces.
This seems to have a tab, whereas the rest has spaces.
matatk
Aug 6, 2018
Author
Owner
Oops; good catch; thanks :-). I usually remember to replace them. Should probably reformat the whole list, but as it gets longer, the task gets less desirable... :-)
Oops; good catch; thanks :-). I usually remember to replace them. Should probably reformat the whole list, but as it gets longer, the task gets less desirable... :-)
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
This massively re-organises the code around ES6 modules, to make it much simpler when built, so that:
Fixes #189