Skip to content

Commit

Permalink
(chore) update ember CLI (#54)
Browse files Browse the repository at this point in the history
Update ember-cli and related dependencies
  • Loading branch information
jrjohnson authored and lukemelia committed May 23, 2018
1 parent d2d268e commit bc80241
Show file tree
Hide file tree
Showing 32 changed files with 3,542 additions and 2,098 deletions.
4 changes: 0 additions & 4 deletions .bowerrc

This file was deleted.

1 change: 1 addition & 0 deletions .eslintignore
@@ -0,0 +1 @@
/blueprints/*/files/**/*.js
43 changes: 40 additions & 3 deletions .eslintrc.js
@@ -1,16 +1,53 @@
module.exports = {
root: true,
parserOptions: {
ecmaVersion: 6,
ecmaVersion: 2017,
sourceType: 'module'
},
extends: 'eslint:recommended',
plugins: [
'ember'
],
extends: [
'eslint:recommended',
'plugin:ember/recommended'
],
env: {
'browser': true
},
globals: {
'Tether': false
},
rules: {
}
},
overrides: [
// node files
{
files: [
'ember-cli-build.js',
'index.js',
'testem.js',
'blueprints/*/index.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
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
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
40 changes: 27 additions & 13 deletions .travis.yml
@@ -1,34 +1,48 @@
---
language: node_js
node_js:
# we recommend testing addons with the same minimum supported node version as Ember CLI
# so that your addon works for all apps
- "4"

sudo: false
dist: trusty
sudo: required

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

cache:
yarn: true

env:
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
allow_failures:
- env: EMBER_TRY_SCENARIO=ember-canary

before_install:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- sleep 3
- curl -o- -L https://yarnpkg.com/install.sh | bash
- export PATH=$HOME/.yarn/bin:$PATH
- yarn global add bower

install:
- yarn install --no-lockfile
- bower install
- yarn install --no-lockfile --non-interactive

script:
- yarn lint:js
# Usually, it's ok to finish the test scenario without reverting
# to the addon's original dependency state, skipping "cleanup".
- ember try:each --skip-cleanup
- node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO --skip-cleanup
2 changes: 1 addition & 1 deletion LICENSE.md
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2016
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
26 changes: 17 additions & 9 deletions README.md
Expand Up @@ -80,27 +80,35 @@ ENV['ember-tether'] = {

It is also possible to pass a `bodyElement` to a particular ember-tether component declaration.

## Development Setup
## Contributing

### Installation

* `git clone` this repository
* `yarn install`
* `git clone <repository-url>`
* `cd my-addon`
* `npm install`
`

### Running Tests
### Linting

* `ember test`
* `ember test --serve`
* `npm run lint:js`
* `npm run lint:js -- --fix`

### Running tests

* `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

This addon uses ember-try to test against multiple versions of Ember:

* `ember try:each`
* `ember try:one ember-release --- ember test --serve`

### Running the dummy app
### Running the dummy application

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

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

Expand Down
8 changes: 5 additions & 3 deletions addon/components/ember-tether.js
@@ -1,6 +1,8 @@
import Ember from 'ember';

const { observer, get, getOwner, run, computed, isNone, Component } = Ember;
import { getOwner } from '@ember/application';
import { run } from '@ember/runloop';
import { computed, get, observer } from '@ember/object';
import { isNone } from '@ember/utils';
import Component from '@ember/component';

export default Component.extend({
classNames: ['ember-tether'],
Expand Down
4 changes: 0 additions & 4 deletions bower.json

This file was deleted.

148 changes: 64 additions & 84 deletions config/ember-try.js
@@ -1,91 +1,71 @@
/* eslint-env node */
module.exports = {
scenarios: [
{
name: 'ember-lts-2.4',
bower: {
dependencies: {
'ember': 'components/ember#lts-2-4'
'use strict';

const getChannelURL = require('ember-source-channel-url');

module.exports = function() {
return Promise.all([
getChannelURL('release'),
getChannelURL('beta'),
getChannelURL('canary')
]).then((urls) => {
return {
useYarn: true,
scenarios: [
{
name: 'ember-lts-2.12',
npm: {
devDependencies: {
'ember-source': '~2.12.0'
}
}
},
resolutions: {
'ember': 'lts-2-4'
}
},
npm: {
devDependencies: {
'ember-source': null
}
}
},
{
name: 'ember-lts-2.8',
bower: {
dependencies: {
'ember': 'components/ember#lts-2-8'
{
name: 'ember-lts-2.16',
npm: {
devDependencies: {
'ember-source': '~2.16.0'
}
}
},
resolutions: {
'ember': 'lts-2-8'
}
},
npm: {
devDependencies: {
'ember-source': null
}
}
},
{
name: 'ember-release',
bower: {
dependencies: {
'ember': 'components/ember#release'
{
name: 'ember-lts-2.18',
npm: {
devDependencies: {
'ember-source': '~2.18.0'
}
}
},
resolutions: {
'ember': 'release'
}
},
npm: {
devDependencies: {
'ember-source': null
}
}
},
{
name: 'ember-beta',
bower: {
dependencies: {
'ember': 'components/ember#beta'
{
name: 'ember-release',
npm: {
devDependencies: {
'ember-source': urls[0]
}
}
},
resolutions: {
'ember': 'beta'
}
},
npm: {
devDependencies: {
'ember-source': null
}
}
},
{
name: 'ember-canary',
bower: {
dependencies: {
'ember': 'components/ember#canary'
{
name: 'ember-beta',
npm: {
devDependencies: {
'ember-source': urls[1]
}
}
},
resolutions: {
'ember': 'canary'
}
},
npm: {
devDependencies: {
'ember-source': null
{
name: 'ember-canary',
npm: {
devDependencies: {
'ember-source': urls[2]
}
}
},
{
name: 'ember-default',
npm: {
devDependencies: {}
}
}
}
},
{
name: 'ember-default',
npm: {
devDependencies: {}
}
}
]
]
};
});
};
1 change: 0 additions & 1 deletion config/environment.js
@@ -1,4 +1,3 @@
/* eslint-env node */
'use strict';

module.exports = function(/* environment, appConfig */) {
Expand Down
5 changes: 3 additions & 2 deletions ember-cli-build.js
@@ -1,8 +1,9 @@
/* eslint-env node */
'use strict';

const EmberAddon = require('ember-cli/lib/broccoli/ember-addon');

module.exports = function(defaults) {
var app = new EmberAddon(defaults, {
let app = new EmberAddon(defaults, {
// Add options here
});

Expand Down

0 comments on commit bc80241

Please sign in to comment.