-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #116 from offirgolan/og-abrams
Ember 2.x Glimmer 2 Support
- Loading branch information
Showing
161 changed files
with
11,532 additions
and
5,208 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
module.exports = { | ||
root: true, | ||
parserOptions: { | ||
ecmaVersion: 6, | ||
sourceType: 'module' | ||
}, | ||
extends: 'eslint:recommended', | ||
env: { | ||
browser: true | ||
}, | ||
globals: { | ||
d3: true, | ||
Rx: true | ||
}, | ||
rules: { | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/bower_components | ||
/config/ember-try.js | ||
/dist | ||
/tests | ||
/tmp | ||
**/.gitkeep | ||
.bowerrc | ||
.editorconfig | ||
.ember-cli | ||
.gitignore | ||
.eslintrc.js | ||
.watchmanconfig | ||
.travis.yml | ||
bower.json | ||
ember-cli-build.js | ||
testem.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,40 @@ | ||
--- | ||
language: node_js | ||
node_js: | ||
- "0.12" | ||
- "6" | ||
|
||
sudo: false | ||
|
||
cache: | ||
directories: | ||
- $HOME/.npm | ||
- $HOME/.cache # includes bowers cache | ||
|
||
env: | ||
- EMBER_TRY_SCENARIO=default | ||
# we recommend testing LTS's and latest stable release (bonus points to beta/canary) | ||
- EMBER_TRY_SCENARIO=ember-lts-2.4 | ||
- EMBER_TRY_SCENARIO=ember-lts-2.8 | ||
- EMBER_TRY_SCENARIO=ember-release | ||
- EMBER_TRY_SCENARIO=ember-beta | ||
- EMBER_TRY_SCENARIO=ember-canary | ||
- EMBER_TRY_SCENARIO=ember-default | ||
|
||
matrix: | ||
fast_finish: true | ||
allow_failures: | ||
- env: EMBER_TRY_SCENARIO=ember-release | ||
- env: EMBER_TRY_SCENARIO=ember-beta | ||
- env: EMBER_TRY_SCENARIO=ember-canary | ||
|
||
before_install: | ||
- export PATH=/usr/local/phantomjs-2.0.0/bin:$PATH | ||
- "npm config set spin false" | ||
- "npm install -g npm@^2" | ||
- npm config set spin false | ||
- npm install -g bower phantomjs-prebuilt | ||
- bower --version | ||
- phantomjs --version | ||
|
||
install: | ||
- npm install -g bower | ||
- npm install | ||
- bower install | ||
|
||
script: | ||
- ember try $EMBER_TRY_SCENARIO test | ||
# Usually, it's ok to finish the test scenario without reverting | ||
# to the addon's original dependency state, skipping "cleanup". | ||
- node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO test --skip-cleanup |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"ignore_dirs": ["tmp", "dist"] | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
import Ember from 'ember'; | ||
import layout from 'ember-nf-graph/templates/components/nf-area-stack'; | ||
import computed from 'ember-new-computed'; | ||
|
||
/** | ||
A component for grouping and stacking `nf-area` components in an `nf-graph`. | ||
This component looks at the order of the `nf-area` components underneath it | ||
and uses the ydata of the next sibling `nf-area` component to determine the bottom | ||
of each `nf-area` components path to be drawn. | ||
### Example | ||
{{#nf-graph width=300 height=100}} | ||
{{#nf-graph-content}} | ||
{{#nf-area-stack}} | ||
{{nf-area data=myData xprop="time" yprop="high"}} | ||
{{nf-area data=myData xprop="time" yprop="med"}} | ||
{{nf-area data=myData xprop="time" yprop="low"}} | ||
{{/nf-area-stack}} | ||
{{/nf-graph-content}} | ||
{{/nf-graph}} | ||
@namespace components | ||
@class nf-area-stack | ||
*/ | ||
export default Ember.Component.extend({ | ||
layout, | ||
tagName: 'g', | ||
|
||
/** | ||
The parent graph for a component. | ||
@property graph | ||
@type components.nf-graph | ||
@default null | ||
*/ | ||
graph: null, | ||
|
||
/** | ||
Whether or not to add the values together to create the stacked area | ||
@property aggregate | ||
@type {boolean} | ||
@default false | ||
*/ | ||
aggregate: computed({ | ||
get() { | ||
Ember.warn('nf-area-stack.aggregate must be set. Currently defaulting to `false` but will default to `true` in the future.'); | ||
return this._aggregate = false; | ||
}, | ||
set(key, value) { | ||
return this._aggregate = value; | ||
} | ||
}), | ||
|
||
/** | ||
The collection of `nf-area` components under this stack. | ||
@property areas | ||
@type Array | ||
@readonly | ||
*/ | ||
areas: computed(function(){ | ||
return Ember.A(); | ||
}), | ||
|
||
/** | ||
Registers an area component with this stack. Also links areas to one | ||
another by setting `nextArea` on each area component. | ||
@method registerArea | ||
@param area {Ember.Component} The area component to register. | ||
*/ | ||
registerArea: function(area) { | ||
let areas = this.get('areas'); | ||
let prev = areas[areas.length - 1]; | ||
|
||
Ember.run.schedule('afterRender', () => { | ||
if(prev) { | ||
prev.set('nextArea', area); | ||
area.set('prevArea', prev); | ||
} | ||
|
||
areas.pushObject(area); | ||
}); | ||
}, | ||
|
||
/** | ||
Unregisters an area component from this stack. Also updates next | ||
and previous links. | ||
@method unregisterArea | ||
@param area {Ember.Component} the area to unregister | ||
*/ | ||
unregisterArea: function(area) { | ||
let prev = area.get('prevArea'); | ||
let next = area.get('nextArea'); | ||
|
||
Ember.run.schedule('afterRender', () => { | ||
if(next) { | ||
next.set('prevArea', prev); | ||
} | ||
|
||
if(prev) { | ||
prev.set('nextArea', next); | ||
} | ||
|
||
this.get('areas').removeObject(area); | ||
}); | ||
}, | ||
}); |
Oops, something went wrong.