Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

ember-set-body-class

ef428.2kMIT1.0.2

Fastboot-compatible, template-driven helper for setting <body> classes.

ember-addon, body, class, fastboot

readme

ember-set-body-class

This addon lets you set classes on the body like:

{{set-body-class "hello"}}

Whenever the above template is rendered, the <body> tag will have class hello added to it. When it's destroyed, the class is removed.

Compatibility

  • Ember.js v3.10 or above
  • Ember CLI v2.13 or above
  • Node.js v10 or above

This works in both browser and Fastboot. Fastboot support requires at least Fastboot 1.1.1 (which incorporated the work done in https://github.com/ember-fastboot/fastboot/pull/171).

Installation

ember install ember-set-body-class

Contributing

See the Contributing guide for details.

License

This project is licensed under the MIT License.

changelog

v1.0.2 (2020-12-02)

:bug: Bug Fix

  • #92 services/body-class: Cancel the scheduled update only on fastboot (@Turbo87)

:house: Internal

  • #82 Adjust browser targets to transpile optional chaining away (@Turbo87)

Committers: 1

v1.0.1 (2020-10-16)

:memo: Documentation

  • #64 Update README and add basic CONTRIBUTING guide (@Turbo87)

:house: Internal

Committers: 1

v1.0.0 (2020-10-16)

:boom: Breaking Change

  • #54 Replace set-body-class component with helper (@Turbo87)
  • #55 Drop support for Ember.js v3.8 and v3.9 (@Turbo87)
  • #24 Drop support for Ember.js v3.7.x and below (@Turbo87)
  • #13 Drop support for Node v4, v6 and v8 (@Turbo87)

:rocket: Enhancement

:bug: Bug Fix

  • #12 util/get-dom: Fix copy/paste issue in the error message (@Turbo87)

:memo: Documentation

  • #9 Update Readme with info about Fastboot support (@acorncom)

:house: Internal

  • #61 Add release-it to simplify the release process (@Turbo87)
  • #60 CI: Add release job (@Turbo87)
  • #57 Convert to native classes (@Turbo87)
  • #26 ember-try: Use ember-source-channel-url for release channels (@Turbo87)
  • #56 CI: Disable broken release channel scenarios (@Turbo87)
  • #53 Replace unit/integration test with more application tests (@Turbo87)
  • #52 Remove obsolete getDOM() utility (@Turbo87)
  • #44 renovate: Enable automerging for semver-compatible updates (@Turbo87)
  • #33 Use prettier for code formatting (@Turbo87)
  • #31 Update ESLint and add Ember and Node plugins (@Turbo87)
  • #30 tests: Remove unused test-helpers (@Turbo87)
  • #29 Update ember-cli-inject-live-reload to v2.0.2 (@Turbo87)
  • #28 Use qunit-dom for CSS class assertions (@Turbo87)
  • #27 tests/acceptance: Use setupApplicationTest() helper (@Turbo87)
  • #25 Remove unused/unnecessary dev dependencies (@Turbo87)
  • #22 Use ember-cli-fastboot-testing for fastboot testing (@Turbo87)
  • #21 Add explicit ember-try dev dependency (@Turbo87)
  • #19 ember-try: Add additional LTS version scenarios (@Turbo87)
  • #17 Migrate from ember-cli-qunit to ember-qunit (@Turbo87)
  • #20 Update fastboot dependencies (@Turbo87)
  • #16 Add GitHub Actions config (@Turbo87)
  • #14 Migrate from ember-cli-eslint to eslint (@Turbo87)

Committers: 2