Update javascript to current versions #424
Merged
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.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #422
As I discussed in #415, I'm considering changes to rosindex that would involve more javascript-driven data search and filtering. Prior to doing that, I want to update the existing javascript to current versions. Hence this PR. I did not squash the branch because it might be useful to see changes in smaller increments. However, some of the earlier commits are incomplete, so they should not be landed without the full branch.
There were a few minor changes to overcome regressions caused by the updates. However, the use of venn.js (and the related d3.js) required more extensive changes, as the previous version we were using was copied from a commit immediately prior to a major, breaking API change.
As part of this, I want to have a clear pattern for access and managing externally-written js files. To that end, the changes include:
There were many existing patterns within rosindex for this. I standardized on a variation of the method currently used for jquery. That is, original file is stored in
js/package_name/package_name-x.x.x.js
, link to file in html isjs/package_name.js
where that is anln -s
softlink to the versioned file injs/package_name
. I also included a reference comment, written by me, at the top of downloaded files to show their source.Also, by using a standard pattern like this for externally-written files, it is clearer the distinction between them and the locally-developed files.
As mentioned in #422, using symbolic links like this has its issues with updates. I included code to work around this looking forward, but if you build with this PR, and then try to rebuild with the existing
ros2
branch, you will experience failures. The workaround is to delete_site
prior to building.The MIT license that is used by most of these files has the clause: "The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software." I located the licenses and included them to meet this requirement.
The changes in this PR (along with others) are incorporated into my development build at index.rosdabbler.com