main.js 971 B

12345678910111213141516171819
  1. /**
  2. * Site-wide JS bundle (→ js/v4-script.min.js) — replaces the gulp `js` output.
  3. *
  4. * Vendor comes from npm (so it's `npm update`-able). The two libs with no clean npm
  5. * package (DrawFillSVG, Rainbow) are small self-exposing files under src/vendor/.
  6. * The 2,834-line scripts.js pile + modernizr are dropped (dead or npm-replaced).
  7. * Page scripts (about.js, studio.js, …) stay separate and consume these globals.
  8. */
  9. import $ from 'jquery';
  10. window.$ = window.jQuery = $;
  11. // Bootstrap JS retired: offcanvas → CSS :target, carousels/tabs/tooltips → native
  12. // per-page vanilla JS. The bootstrap npm package stays for the SCSS subset only.
  13. import 'jquery-validation'; // → $.fn.validate (comment forms: about, single)
  14. import 'jquery-lazyload'; // → $.fn.lazyload (desk)
  15. import './vendor/drawfillsvg.js'; // self-exposes window.DrawFillSVG (about, studio)
  16. import './vendor/rainbow.js'; // self-exposes window.Rainbow (code page + data-language posts)