Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Isolate cookiebar module JS #119

Merged
merged 12 commits into from
May 9, 2024
Merged

Isolate cookiebar module JS #119

merged 12 commits into from
May 9, 2024

Commits on May 9, 2024

  1. 🎉 Add TS boilerplate

    Added boilerplate to create/bundle an npm package on Github, so that
    the build artifact(s) can be included in the static files of the
    django app for ease of use, and other projects can separately install
    the package for the JS with npm to bundle the JS with their own
    solution.
    sergei-maertens committed May 9, 2024
    Configuration menu
    Copy the full SHA
    ae76649 View commit details
    Browse the repository at this point in the history
  2. ♻️ Refactor cookiebar.module.js into TS module

    The added type safety helps catch bugs, and the setup is simple enough
    for people not too familiar with TS to be able to contribute.
    
    Small refactors have been done to avoid globals and localize state a
    bit more, which shouldn't affect anyone.
    sergei-maertens committed May 9, 2024
    Configuration menu
    Copy the full SHA
    af0d31b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    883afe4 View commit details
    Browse the repository at this point in the history
  4. 🔨 Use esbuild to bundle for django staticfiles

    The cookiebar module TS source is taken as input, and the
    resulting bundle written to the cookie consent staticfiles
    directory.
    sergei-maertens committed May 9, 2024
    Configuration menu
    Copy the full SHA
    b954dcf View commit details
    Browse the repository at this point in the history
  5. 🐛 Closes #116 - swap order of onShow and doInsert

    The onShow handler should be invoked after the node was inserted.
    
    Thanks to @grrodre for contributing the patch!
    sergei-maertens committed May 9, 2024
    Configuration menu
    Copy the full SHA
    e1498dc View commit details
    Browse the repository at this point in the history
  6. 📦 Build JS assets in CI and gitignore them

    The npm 'package' and the django staticfiles assets are exclusively
    to be built in the CI pipeline, and not kept in version control.
    
    This keeps a single source of truth and prevents us from forgetting to
    update the artifacts, at the cost of a little extra step for local
    development.
    sergei-maertens committed May 9, 2024
    Configuration menu
    Copy the full SHA
    9a3b2a9 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    cbcc422 View commit details
    Browse the repository at this point in the history
  8. 📝 Update release instructions

    Ensure that the frontend package version is also bumped.
    sergei-maertens committed May 9, 2024
    Configuration menu
    Copy the full SHA
    3839ea4 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    dc7c716 View commit details
    Browse the repository at this point in the history
  10. 🐛 Add missing extension to import/export statements

    A package with type: module requires extensions in the imports to
    fully resolve them (tested with Webpack 5). We can simply use the .js
    extension even in .ts files, tsc understands it (even though this looks
    really weird).
    sergei-maertens committed May 9, 2024
    Configuration menu
    Copy the full SHA
    5d993d2 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    d0deb07 View commit details
    Browse the repository at this point in the history
  12. 🔖 Bump version to 0.6.0 beta 0

    The code is different from 0.5.0 beta 0, and the next release will
    be 0.6.0.
    sergei-maertens committed May 9, 2024
    Configuration menu
    Copy the full SHA
    0191b88 View commit details
    Browse the repository at this point in the history