Skip to content

Commit

Permalink
Shift (partially) to Webpack (AdvisorySG#85)
Browse files Browse the repository at this point in the history
The primary purpose of the shift was to enable ES6-style imports in
`main.js`. Most dependencies have been shifted to being managed under NPM which
should make upgrading them much easier.

The following deemed unnecessary dependencies have been removed:
1. MD5

Notes:
1. OWL Carousel has been retained in its original form as there is no direct
   replacement currently. See https://www.npmjs.com/package/owlcarousel to
   verify that the only other dependency aside from the JS library is the CSS
   spreadsheet. The minified JS file has been replaced with the original
   source code for easier debugging.
2. jQuery requires a hack when doing ES6-style imports, see
   https://stackoverflow.com/questions/35358625/jquery-is-not-defined-when-use-es6-import
   for more details.
  • Loading branch information
wei2912 authored Apr 11, 2022
1 parent bdff646 commit 1d128fb
Show file tree
Hide file tree
Showing 16 changed files with 3,489 additions and 164 deletions.
3 changes: 3 additions & 0 deletions assets/js/jquery-global.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import jquery from 'jquery';
window.jQuery = jquery;
window.$ = jquery;
10 changes: 0 additions & 10 deletions assets/js/lib/elasticlunr.min.js

This file was deleted.

12 changes: 0 additions & 12 deletions assets/js/lib/infinite-scroll.pkgd.min.js

This file was deleted.

87 changes: 0 additions & 87 deletions assets/js/lib/jquery.fitvids.js

This file was deleted.

2 changes: 0 additions & 2 deletions assets/js/lib/lazysizes.min.js

This file was deleted.

1 change: 0 additions & 1 deletion assets/js/lib/md5.min.js

This file was deleted.

Loading

0 comments on commit 1d128fb

Please sign in to comment.