Skip to content

Commit eb8852f

Browse files
authored
Merge branch 'master' into add-custom-plugin-support
2 parents c0ab82f + 26748a7 commit eb8852f

28 files changed

+7975
-4183
lines changed

.eslintignore

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# unconventional js
2+
/blueprints/*/files/
3+
/vendor/
4+
5+
# compiled output
6+
/dist/
7+
/tmp/
8+
9+
# dependencies
10+
/bower_components/
11+
/node_modules/
12+
13+
# misc
14+
/coverage/
15+
!.*
16+
17+
# ember-try
18+
/.node_modules.ember-try/
19+
/bower.json.ember-try
20+
/package.json.ember-try

.eslintrc.js

+41-2
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,49 @@ module.exports = {
44
ecmaVersion: 2017,
55
sourceType: 'module'
66
},
7-
extends: 'eslint:recommended',
7+
plugins: [
8+
'ember'
9+
],
10+
extends: [
11+
'eslint:recommended',
12+
'plugin:ember/recommended'
13+
],
814
env: {
915
browser: true
1016
},
1117
rules: {
12-
}
18+
},
19+
overrides: [
20+
// node files
21+
{
22+
files: [
23+
'.eslintrc.js',
24+
'.template-lintrc.js',
25+
'ember-cli-build.js',
26+
'index.js',
27+
'testem.js',
28+
'blueprints/*/index.js',
29+
'config/**/*.js',
30+
'tests/dummy/config/**/*.js'
31+
],
32+
excludedFiles: [
33+
'addon/**',
34+
'addon-test-support/**',
35+
'app/**',
36+
'tests/dummy/app/**'
37+
],
38+
parserOptions: {
39+
sourceType: 'script',
40+
ecmaVersion: 2015
41+
},
42+
env: {
43+
browser: false,
44+
node: true
45+
},
46+
plugins: ['node'],
47+
rules: Object.assign({}, require('eslint-plugin-node').configs.recommended.rules, {
48+
// add your custom rules and overrides for node files here
49+
})
50+
}
51+
]
1352
};

.gitignore

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
# See https://help.github.com/ignore-files/ for more about ignoring files.
22

33
# compiled output
4-
/dist
5-
/tmp
4+
/dist/
5+
/tmp/
66

77
# dependencies
8-
/node_modules
9-
/bower_components
8+
/bower_components/
9+
/node_modules/
1010

1111
# misc
1212
/.sass-cache
1313
/connect.lock
14-
/coverage/*
14+
/coverage/
1515
/libpeerconnection.log
16-
npm-debug.log*
17-
yarn-error.log
18-
testem.log
16+
/npm-debug.log*
17+
/testem.log
18+
/yarn-error.log
1919

2020
# ember-try
21-
.node_modules.ember-try/
22-
bower.json.ember-try
23-
package.json.ember-try
21+
/.node_modules.ember-try/
22+
/bower.json.ember-try
23+
/package.json.ember-try

.npmignore

+28-15
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,29 @@
1-
/bower_components
1+
# compiled output
2+
/dist/
3+
/tmp/
4+
5+
# dependencies
6+
/bower_components/
7+
8+
# misc
9+
/.bowerrc
10+
/.editorconfig
11+
/.ember-cli
12+
/.eslintignore
13+
/.eslintrc.js
14+
/.gitignore
15+
/.template-lintrc.js
16+
/.travis.yml
17+
/.watchmanconfig
18+
/bower.json
219
/config/ember-try.js
3-
/dist
4-
/tests
5-
/tmp
6-
**/.gitkeep
7-
.bowerrc
8-
.editorconfig
9-
.ember-cli
10-
.gitignore
11-
.eslintrc.js
12-
.watchmanconfig
13-
.travis.yml
14-
bower.json
15-
ember-cli-build.js
16-
testem.js
20+
/ember-cli-build.js
21+
/testem.js
22+
/tests/
23+
/yarn.lock
24+
.gitkeep
25+
26+
# ember-try
27+
/.node_modules.ember-try/
28+
/bower.json.ember-try
29+
/package.json.ember-try

.template-lintrc.js

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
'use strict';
2+
3+
module.exports = {
4+
extends: 'recommended'
5+
};

.travis.yml

+25-14
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
---
22
language: node_js
33
node_js:
4+
# we recommend testing addons with the same minimum supported node version as Ember CLI
5+
# so that your addon works for all apps
46
- "6"
57

68
sudo: false
@@ -17,27 +19,36 @@ env:
1719
global:
1820
# See https://git.io/vdao3 for details.
1921
- JOBS=1
20-
matrix:
22+
23+
jobs:
24+
fail_fast: true
25+
allow_failures:
26+
- env: EMBER_TRY_SCENARIO=ember-canary
27+
28+
include:
29+
# runs linting and tests with current locked deps
30+
31+
- stage: "Tests"
32+
name: "Tests"
33+
script:
34+
- npm run lint:hbs
35+
- npm run lint:js
36+
- npm test
37+
2138
# we recommend new addons test the current and previous LTS
2239
# as well as latest stable release (bonus points to beta/canary)
23-
- EMBER_TRY_SCENARIO=ember-lts-2.8
24-
- EMBER_TRY_SCENARIO=ember-lts-2.12
25-
- EMBER_TRY_SCENARIO=ember-release
26-
- EMBER_TRY_SCENARIO=ember-beta
27-
- EMBER_TRY_SCENARIO=ember-canary
28-
- EMBER_TRY_SCENARIO=ember-default
29-
30-
matrix:
31-
fast_finish: true
32-
allow_failures:
40+
- stage: "Additional Tests"
41+
env: EMBER_TRY_SCENARIO=ember-lts-2.16
42+
- env: EMBER_TRY_SCENARIO=ember-lts-2.18
43+
- env: EMBER_TRY_SCENARIO=ember-release
44+
- env: EMBER_TRY_SCENARIO=ember-beta
3345
- env: EMBER_TRY_SCENARIO=ember-canary
46+
- env: EMBER_TRY_SCENARIO=ember-default-with-jquery
3447

3548
before_install:
3649
- npm config set spin false
3750
- npm install -g npm@4
3851
- npm --version
3952

4053
script:
41-
# Usually, it's ok to finish the test scenario without reverting
42-
# to the addon's original dependency state, skipping "cleanup".
43-
- node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO --skip-cleanup
54+
- node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO

LICENSE.md

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2018
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6+
7+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8+
9+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

addon/components/ember-chart.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* global Chart */
2-
import Ember from 'ember';
2+
import Component from '@ember/component';
33

4-
export default Ember.Component.extend({
4+
export default Component.extend({
55
tagName: 'canvas',
66
attributeBindings: ['width', 'height'],
77
plugins: [],
@@ -13,7 +13,7 @@ export default Ember.Component.extend({
1313
let type = this.get('type');
1414
let options = this.get('options');
1515
let plugins = this.get('plugins');
16-
16+
1717
let chart = new Chart(context, {
1818
type: type,
1919
data: data,
@@ -32,16 +32,16 @@ export default Ember.Component.extend({
3232
this._super(...arguments);
3333
this.updateChart();
3434
},
35-
35+
3636
updateChart() {
3737
let chart = this.get('chart');
3838
let data = this.get('data');
3939
let options = this.get('options');
4040
let animate = this.get('animate');
4141

4242
if (chart) {
43-
chart.config.data = data;
44-
chart.config.options = options;
43+
chart.data = data;
44+
chart.options = options;
4545
if (animate) {
4646
chart.update();
4747
} else {

0 commit comments

Comments
 (0)