Install javascript packages with npm instead of putting the files directly in the source code #764
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.
This PR adds a new module that makes it possible to install javascript packages with npm. Currently, we are doing this by downloading a complete javascript file and adding it into the repository. For example, this is how we do it with codemirror and materialize. This was the way to it several years ago, but now everyone relies on npm instead. One of the main advantages is that it separates our libraries from our code as well as makes it much easier to remember to update the libraries. So I have added a module that allows us to install packages from npm and use them in our code.
To test the functionality of the npm module, I have also installed codemirror with npm to see if it works. This replaces the HTML code editor used in the HTML block when creating a webpage with the new codemirror from npm. Before, we had version 5 of codemirror but now they are using version 6, which means there are some changes to the HTML block code as well, but functionality should be similar
Closes #728