Skip to content

Commit

Permalink
update ember and ember-cli
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelcobain committed Apr 11, 2018
1 parent f16860c commit 34d1269
Show file tree
Hide file tree
Showing 36 changed files with 7,875 additions and 459 deletions.
4 changes: 0 additions & 4 deletions .bowerrc

This file was deleted.

37 changes: 35 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,46 @@ module.exports = {
ecmaVersion: 2017,
sourceType: 'module'
},
plugins: [
'ember'
],
extends: [
'eslint:recommended',
'plugin:ember-suave/recommended'
'plugin:ember/recommended'
],
env: {
browser: true
},
rules: {
}
},
overrides: [
// node files
{
files: [
'ember-cli-build.js',
'index.js',
'testem.js',
'config/**/*.js',
'tests/dummy/config/**/*.js'
],
excludedFiles: [
'addon/**',
'addon-test-support/**',
'app/**',
'tests/dummy/app/**'
],
parserOptions: {
sourceType: 'script',
ecmaVersion: 2015
},
env: {
browser: false,
node: true
},
plugins: ['node'],
rules: Object.assign({}, require('eslint-plugin-node').configs.recommended.rules, {
// add your custom rules and overrides for node files here
})
}
]
};
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,10 @@
/coverage/*
/libpeerconnection.log
npm-debug.log*
yarn-error.log
testem.log

# ember-try
.node_modules.ember-try/
bower.json.ember-try
package.json.ember-try
7 changes: 6 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,15 @@
.bowerrc
.editorconfig
.ember-cli
.gitignore
.eslintrc.js
.gitignore
.watchmanconfig
.travis.yml
bower.json
ember-cli-build.js
testem.js

# ember-try
.node_modules.ember-try/
bower.json.ember-try
package.json.ember-try
48 changes: 22 additions & 26 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,34 @@
---
language: node_js
node_js:
- "7"
# we recommend testing addons with the same minimum supported node version as Ember CLI
# so that your addon works for all apps
- "4"

dist: trusty
sudo: false
dist: trusty

addons:
apt:
packages:
- google-chrome-stable
chrome: stable

cache:
directories:
- $HOME/.npm
- $HOME/.cache # includes bowers cache

env:
# 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
global:
# See https://git.io/vdao3 for details.
- JOBS=1
matrix:
# we recommend new addons test the current and previous LTS
# as well as latest stable release (bonus points to beta/canary)
- EMBER_TRY_SCENARIO=ember-lts-2.12
- EMBER_TRY_SCENARIO=ember-lts-2.16
- EMBER_TRY_SCENARIO=ember-lts-2.18
- EMBER_TRY_SCENARIO=ember-release
- EMBER_TRY_SCENARIO=ember-beta
- EMBER_TRY_SCENARIO=ember-canary
- EMBER_TRY_SCENARIO=ember-default

matrix:
fast_finish: true
Expand All @@ -32,20 +37,11 @@ matrix:

before_install:
- npm config set spin false
- npm install -g bower phantomjs-prebuilt
- bower --version
- phantomjs --version

install:
- npm install
- bower install

before_script:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- sleep 3 # give xvfb some time to start
- npm install -g npm@4
- npm --version

script:
- npm run lint:js
# 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
- node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO --skip-cleanup
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2017
Copyright (c) 2018

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:

Expand Down
34 changes: 23 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,23 +90,35 @@ Use this component to render what goes inside the expanded content area.
Use this component to render what goes inside the expanded footer area.


## Credits
Contributing
------------------------------------------------------------------------------

This addon was inspired by [angular-material-expansion-panel](https://github.com/B-3PO/angular-material-expansion-panel) project.
### Installation

## Running
* `git clone <repository-url>`
* `cd my-addon`
* `npm install`

* `ember serve`
* Visit your app at [http://localhost:4200](http://localhost:4200).
### Linting

* `npm run lint:js`
* `npm run lint:js -- --fix`

## Running Tests
### Running tests

* `npm test` (Runs `ember try:each` to test your addon against multiple Ember versions)
* `ember test`
* `ember test --server`
* `ember test` Runs the test suite on the current Ember version
* `ember test --server` – Runs the test suite in "watch mode"
* `ember try:each` – Runs the test suite against multiple Ember versions

## Building
### Running the dummy application

* `ember build`
* `ember serve`
* Visit the dummy application at [http://localhost:4200](http://localhost:4200).

For more information on using ember-cli, visit [https://ember-cli.com/](https://ember-cli.com/).

License
------------------------------------------------------------------------------

This project is licensed under the [MIT License](LICENSE.md).

11 changes: 7 additions & 4 deletions addon/components/paper-expansion-panel.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import Ember from 'ember';
import Component from '@ember/component';
import layout from '../templates/components/paper-expansion-panel';
const { Component } = Ember;

export default Component.extend({
layout,
Expand All @@ -11,12 +10,16 @@ export default Component.extend({

expand() {
this.set('expanded', true);
this.sendAction('onExpandedChange', true);
if (this.get('onExpandedChange')) {
this.get('onExpandedChange')(true);
}
},

collapse() {
this.set('expanded', false);
this.sendAction('onExpandedChange', false);
if (this.get('onExpandedChange')) {
this.get('onExpandedChange')(false);
}
},

keyDown(ev) {
Expand Down
3 changes: 1 addition & 2 deletions addon/components/paper-expansion-panel/collapsed.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import Ember from 'ember';
import Component from '@ember/component';
import layout from '../../templates/components/paper-expansion-panel/collapsed';
const { Component } = Ember;

export default Component.extend({
layout,
Expand Down
3 changes: 1 addition & 2 deletions addon/components/paper-expansion-panel/expanded.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import Ember from 'ember';
import Component from '@ember/component';
import layout from '../../templates/components/paper-expansion-panel/expanded';
const { Component } = Ember;

export default Component.extend({
layout,
Expand Down
3 changes: 1 addition & 2 deletions addon/components/paper-expansion-panel/expanded/content.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import Ember from 'ember';
import Component from '@ember/component';
import layout from '../../../templates/components/paper-expansion-panel/expanded/content';
const { Component } = Ember;

export default Component.extend({
layout,
Expand Down
3 changes: 1 addition & 2 deletions addon/components/paper-expansion-panel/expanded/footer.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import Ember from 'ember';
import Component from '@ember/component';
import layout from '../../../templates/components/paper-expansion-panel/expanded/footer';
const { Component } = Ember;

export default Component.extend({
layout,
Expand Down
3 changes: 1 addition & 2 deletions addon/components/paper-expansion-panel/expanded/header.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import Ember from 'ember';
import Component from '@ember/component';
import layout from '../../../templates/components/paper-expansion-panel/expanded/header';
const { Component } = Ember;

export default Component.extend({
layout,
Expand Down

0 comments on commit 34d1269

Please sign in to comment.