Skip to content

Commit

Permalink
enable lazy-loading of gitgraph.js
Browse files Browse the repository at this point in the history
- moved gitgraph.js to web_src and made it importable and es6-compatible
- created new webpack chunk for gitgraph
- enabled CSS loader in webpack
- enabled async/await syntax via regenerator-runtime
- added script to ensure webpack chunks are loaded correctly
- disable terser's comment extraction to prevent .LICENCE files

gitgraph.js has many issues:

1. it is incompatible with ES6 because of strict-mode violations
1. it does not export anything
1. it's css has weird styles like for `body`
1. it is not available on npm

I fixed points 1-3 in our version so it's now loadable in webpack. We should eventually consider alternatives.
  • Loading branch information
silverwind committed Nov 17, 2019
1 parent 06984bb commit 1936cac
Show file tree
Hide file tree
Showing 23 changed files with 1,334 additions and 676 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/public/js/semantic.dropdown.custom.js
/web_src/js/vendor/**
1 change: 1 addition & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ env:
node: true

globals:
__webpack_public_path__: true
Clipboard: false
CodeMirror: false
Dropzone: false
Expand Down
Loading

0 comments on commit 1936cac

Please sign in to comment.