Skip to content

feat: v3.0.0-alpha.1 — modular build, ESM, TypeScript, multi-version docs#17

Merged
vineethkrishnan merged 1 commit into
masterfrom
feat/v3-alpha1-build-architecture
Apr 3, 2026
Merged

feat: v3.0.0-alpha.1 — modular build, ESM, TypeScript, multi-version docs#17
vineethkrishnan merged 1 commit into
masterfrom
feat/v3-alpha1-build-architecture

Conversation

@vineethkrishnan

Copy link
Copy Markdown
Owner

Summary

First milestone of the v3.0 upgrade — modernizes the build system, modularizes the source, and adds multi-version documentation.

Build & Tooling

  • Replace Grunt with Rollup — outputs UMD (min + dev) and ESM
  • Replace Grunt sass/cssmin with sass CLI + PostCSS (autoprefixer + cssnano)
  • Add TypeScript declarations (dist/types/jquery.verticalscroll.d.ts)
  • Add .browserslistrc, exports map, module + types fields in package.json
  • Node engine requirement updated to >=18

Source Architecture

  • Modularize 1,105-line monolith into 9 focused ES modules
  • Add WeakMap instance storage with getInstance(element) static method
  • Add double-initialization prevention with console warning

Documentation

  • Multi-version docs — users can switch between v3 (latest) and v2 (stable) via navbar dropdown
  • v3 docs updated: installation (ESM/TypeScript), API (getInstance), migration guide (v2→v3), contributing (Rollup build)
  • v2 docs frozen in docs/v2/

Demo & CI

  • Demo references dist/ files instead of source
  • CI builds before deploying demo and running tests

Backward Compatibility

  • Zero API breaking changes — all options, methods, events, themes, and animations work identically
  • Bundle size: JS +9.5% (14.1KB, within 10% target), CSS -0.9%
  • 152/152 unit tests pass

Test plan

  • All 152 unit tests pass against built dist output
  • Full build succeeds (npm run build)
  • Bundle size within 10% of v2 baseline
  • Verify docs version switcher works on Cloudflare Pages
  • Verify demo loads correctly with dist files
  • Verify ESM import works in a test project

…docs

Build & Tooling:
- Replace Grunt with Rollup for JS bundling (3 outputs: UMD min, UMD dev, ESM)
- Replace Grunt sass/cssmin with sass CLI + PostCSS (autoprefixer + cssnano)
- Add .browserslistrc for explicit browser targets
- Add TypeScript declarations (dist/types/jquery.verticalscroll.d.ts)
- Add package.json exports map, module field, types field
- Update Node engine requirement to >=18

Source Architecture:
- Modularize 1,105-line monolith into 9 focused ES modules:
  constants, utils, core, navigation, pagination, accessibility,
  input, auto-scroll, index
- Add WeakMap instance storage with getInstance() static method
- Add double-initialization prevention with console warning

Documentation:
- Add multi-version docs support (v2 + v3) with version switcher
- Create v3 docs: migration guide, updated installation (ESM/TS),
  updated API (getInstance), updated contributing (Rollup build)
- Move existing docs into v2/ directory (frozen)
- Update coverpage and navbar for v3

Demo & CI:
- Update demo to reference dist/ files instead of source
- Update CI to build before deploying demo
- Add build step before unit tests in CI

All 152 existing tests pass. Bundle size: JS +9.5%, CSS -0.9%.
@vineethkrishnan vineethkrishnan merged commit d090069 into master Apr 3, 2026
8 checks passed
@vineethkrishnan vineethkrishnan deleted the feat/v3-alpha1-build-architecture branch April 3, 2026 07:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant