Skip to content

Instantly share code, notes, and snippets.

@buschtoens
buschtoens / diff-attrs.js
Last active September 4, 2020 17:56
This mixin can be used dry up the diffing of attrs in Ember Components.
import Ember from 'ember';
const EMPTY_OBJECT = Object.freeze(Object.create(null));
const EMPTY_ARRAY = Object.freeze([]);
/**
* @class DiffAttrsMixin
*/
export default Ember.Mixin.create({
/**
@thijsvdanker
thijsvdanker / dynamic-high-charts.js
Last active January 14, 2016 03:55
Ember-cli-highcharts component extension that updates series, axis and colors
import Ember from 'ember';
import EmberHighChartsComponent from 'ember-highcharts/components/high-charts';
const { get } = Ember;
export default EmberHighChartsComponent.extend({
callback: (chart) => {
if (!chart.series.any((item) => { return item.data.length > 0; })) {
chart.series.forEach((serie) => {
serie.remove();
@kristianmandrup
kristianmandrup / Converting libraries to Ember CLI addons.md
Last active April 21, 2023 17:14
Guide to Developing Addons and Blueprints for Ember CLI

Converting libraries to Ember CLI addons

In this guide we will cover two main cases:

  • Ember specific library
  • vendor library

Ember library

The Ember library will assume that Ember has already ben loaded (higher in the loading order) and thus will assume it has access to the Ember API.