Skip to content

Commit

Permalink
update to ember and ember-cli 2.17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelcobain committed Dec 6, 2017
1 parent b31f0bf commit c9c2935
Show file tree
Hide file tree
Showing 30 changed files with 5,457 additions and 222 deletions.
4 changes: 0 additions & 4 deletions .bowerrc

This file was deleted.

13 changes: 13 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module.exports = {
root: true,
parserOptions: {
ecmaVersion: 2017,
sourceType: 'module'
},
extends: 'eslint:recommended',
env: {
browser: true
},
rules: {
}
};
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.
# See https://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/dist
Expand All @@ -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
32 changes: 0 additions & 32 deletions .jshintrc

This file was deleted.

7 changes: 6 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,14 @@
.editorconfig
.ember-cli
.gitignore
.jshintrc
.eslintrc.js
.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
38 changes: 22 additions & 16 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,33 @@
---
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

addons:
chrome: stable

cache:
directories:
- node_modules
- $HOME/.npm

env:
# we recommend testing LTS's and latest stable release (bonus points to beta/canary)
- EMBER_TRY_SCENARIO=ember-1.13
- EMBER_TRY_SCENARIO=ember-lts-2.4
- EMBER_TRY_SCENARIO=ember-release
- EMBER_TRY_SCENARIO=ember-beta
- EMBER_TRY_SCENARIO=ember-canary
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-release
- EMBER_TRY_SCENARIO=ember-beta
- EMBER_TRY_SCENARIO=ember-canary
- EMBER_TRY_SCENARIO=ember-default

matrix:
fast_finish: true
Expand All @@ -24,16 +36,10 @@ matrix:

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

install:
- npm install
- bower install
- npm install -g npm@4
- npm --version

script:
# Usually, it's ok to finish the test scenario without reverting
# to the addon's original dependency state, skipping "cleanup".
- 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) 2016
Copyright (c) 2017

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
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ This background-color style will only be applied if `image` is a "falsy" value:

## Installation

* `git clone` this repository
* `git clone <repository-url>` this repository
* `cd initials-avatar`
* `npm install`
* `bower install`

## Running

Expand All @@ -74,11 +74,12 @@ This background-color style will only be applied if `image` is a "falsy" value:

## Running Tests

* `npm test` (Runs `ember try:each` to test your addon against multiple Ember versions)
* `ember test`
* `ember test --server`

## Building

* `ember build`

For more information on using ember-cli, visit [http://www.ember-cli.com/](http://www.ember-cli.com/).
For more information on using ember-cli, visit [https://ember-cli.com/](https://ember-cli.com/).
9 changes: 6 additions & 3 deletions addon/components/initials-avatar.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import Ember from 'ember';
const { Component, computed, isPresent, String: { htmlSafe } } = Ember;
import { notEmpty } from '@ember/object/computed';
import Component from '@ember/component';
import { computed } from '@ember/object';
import { isPresent } from '@ember/utils';
import { htmlSafe } from '@ember/string';

export default Component.extend({
classNameBindings: [':initialsAvatar', 'avatarColor'],
Expand All @@ -13,7 +16,7 @@ export default Component.extend({
colorIndex: 1,
maxColorIndex: 1,

hasImage: computed.notEmpty('image'),
hasImage: notEmpty('image'),

initials: computed('firstName', 'lastName', 'company', 'email', function() {
let first = this.initial(this.get('firstName'));
Expand Down
1 change: 0 additions & 1 deletion app/components/initials-avatar.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import Ember from 'ember';
import InitialsAvatar from 'initials-avatar/components/initials-avatar';

export default InitialsAvatar;
7 changes: 0 additions & 7 deletions bower.json

This file was deleted.

45 changes: 30 additions & 15 deletions config/ember-try.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,19 @@
/*jshint node:true*/
/* eslint-env node */
module.exports = {
scenarios: [
{
name: 'ember-1.13',
bower: {
dependencies: {
'ember': '~1.13.0'
},
resolutions: {
'ember': '~1.13.0'
name: 'ember-lts-2.12',
npm: {
devDependencies: {
'ember-source': '~2.12.0'
}
}
},
{
name: 'ember-lts-2.4',
bower: {
dependencies: {
'ember': 'components/ember#lts-2-4'
},
resolutions: {
'ember': 'lts-2-4'
name: 'ember-lts-2.16',
npm: {
devDependencies: {
'ember-source': '~2.16.0'
}
}
},
Expand All @@ -32,6 +26,11 @@ module.exports = {
resolutions: {
'ember': 'release'
}
},
npm: {
devDependencies: {
'ember-source': null
}
}
},
{
Expand All @@ -43,6 +42,11 @@ module.exports = {
resolutions: {
'ember': 'beta'
}
},
npm: {
devDependencies: {
'ember-source': null
}
}
},
{
Expand All @@ -54,6 +58,17 @@ module.exports = {
resolutions: {
'ember': 'canary'
}
},
npm: {
devDependencies: {
'ember-source': null
}
}
},
{
name: 'ember-default',
npm: {
devDependencies: {}
}
}
]
Expand Down
2 changes: 1 addition & 1 deletion config/environment.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*jshint node:true*/
/* eslint-env node */
'use strict';

module.exports = function(/* environment, appConfig */) {
Expand Down
9 changes: 5 additions & 4 deletions ember-cli-build.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
/*jshint node:true*/
/* global require, module */
var EmberAddon = require('ember-cli/lib/broccoli/ember-addon');
/* 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
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* jshint node: true */
/* eslint-env node */
'use strict';

module.exports = {
Expand Down
48 changes: 24 additions & 24 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,43 +2,43 @@
"name": "initials-avatar",
"version": "0.2.1",
"description": "Generate an avatar based on a person's first name, last name, company name, and email",
"keywords": [
"ember-addon"
],
"license": "MIT",
"author": "freshbooks",
"directories": {
"doc": "doc",
"test": "tests"
},
"repository": "https://github.com/freshbooks/initials-avatar",
"scripts": {
"build": "ember build",
"start": "ember server",
"start": "ember serve",
"test": "ember try:each"
},
"repository": "https://github.com/freshbooks/initials-avatar",
"engines": {
"node": ">= 0.12.0"
"dependencies": {
"ember-cli-babel": "^6.6.0"
},
"author": "freshbooks",
"license": "MIT",
"devDependencies": {
"broccoli-asset-rev": "^2.4.5",
"ember-ajax": "^2.4.1",
"ember-cli": "2.9.1",
"ember-cli-dependency-checker": "^1.3.0",
"ember-cli-htmlbars": "^1.0.10",
"ember-cli-htmlbars-inline-precompile": "^0.4.3",
"ember-ajax": "^3.0.0",
"ember-cli": "~2.17.0",
"ember-cli-dependency-checker": "^2.0.0",
"ember-cli-eslint": "^4.2.1",
"ember-cli-htmlbars": "^2.0.1",
"ember-cli-htmlbars-inline-precompile": "^1.0.0",
"ember-cli-inject-live-reload": "^1.4.1",
"ember-cli-jshint": "^1.0.4",
"ember-cli-qunit": "^3.0.1",
"ember-cli-release": "^0.2.9",
"ember-cli-test-loader": "^1.1.0",
"ember-cli-uglify": "^1.2.0",
"ember-load-initializers": "^0.5.1",
"ember-resolver": "^2.0.3",
"loader.js": "^4.0.10"
"ember-cli-qunit": "^4.1.1",
"ember-cli-shims": "^1.2.0",
"ember-cli-uglify": "^2.0.0",
"ember-load-initializers": "^1.0.0",
"ember-resolver": "^4.0.0",
"ember-source": "~2.17.0",
"loader.js": "^4.2.3"
},
"keywords": [
"ember-addon"
],
"dependencies": {
"ember-cli-babel": "^6.1.0"
"engines": {
"node": "^4.5 || 6.* || >= 7.*"
},
"ember-addon": {
"configPath": "tests/dummy/config"
Expand Down
Loading

0 comments on commit c9c2935

Please sign in to comment.