Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modernize ELT, kill bower and enable yarn #438

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
module.exports = {
root: true,
parserOptions: {
ecmaVersion: 2017,
sourceType: 'module'
},
extends: [
'eslint:recommended',
'plugin:ember-suave/recommended'
],
env: {
browser: true
},
rules: {
'generator-star-spacing': ['error', { before: false, after: false }],
'ember-suave/require-access-in-comments': 'off',
'ember-suave/no-const-outside-module-scope': 'off'
}
};
5 changes: 3 additions & 2 deletions .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 @@ -13,7 +13,8 @@
/connect.lock
/coverage/*
/libpeerconnection.log
npm-debug.log
npm-debug.log*
yarn-error.log
testem.log
lcov.dat
.vscodeignore
Expand Down
5 changes: 0 additions & 5 deletions .jscsrc

This file was deleted.

33 changes: 0 additions & 33 deletions .jshintrc

This file was deleted.

2 changes: 1 addition & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
.editorconfig
.ember-cli
.gitignore
.jshintrc
.eslintrc.js
.watchmanconfig
.travis.yml
bower.json
Expand Down
49 changes: 22 additions & 27 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
---
language: node_js
node_js:
- "4"
- "6"

sudo: required
dist: trusty

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

addons:
code_climate:
Expand All @@ -21,38 +18,36 @@ addons:
packages:
- google-chrome-stable

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-2.12.2
- 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
- env: EMBER_TRY_SCENARIO=ember-beta

before_install:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
- npm config set spin false
- npm install -g npm@^3
- npm install -g bower
- npm install -g codeclimate-test-reporter
- bower --version
- curl -o- -L https://yarnpkg.com/install.sh | bash
- export PATH=$HOME/.yarn/bin:$PATH
- yarn global add codeclimate-test-reporter

install:
- npm install
- bower install
- yarn install --no-lockfile

script:
- ember try:one $EMBER_VERSION --skip-cleanup=true --- ember test

env:
matrix:
- EMBER_VERSION=ember-lts-2.4
- EMBER_VERSION=ember-lts-2.8
- EMBER_VERSION=ember-2.12.2
- EMBER_VERSION=ember-release
- EMBER_VERSION=ember-beta
- EMBER_VERSION=ember-canary

matrix:
allow_failures:
- env: EMBER_VERSION=ember-canary
- env: EMBER_VERSION=ember-beta
# 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

after_script:
- codeclimate-test-reporter < coverage/lcov.info
1 change: 1 addition & 0 deletions addon/-private/global-options.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import Ember from 'ember';
import config from 'ember-get-config';

// eslint-disable-next-line ember-suave/no-direct-property-access
const assign = Ember.assign || Ember.merge;
const globalOptions = config['ember-light-table'] || {};

Expand Down
3 changes: 2 additions & 1 deletion addon/-private/sync-array-proxy.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import Ember from 'ember';

const {
ArrayProxy,
assert,
isArray
} = Ember;

const EMPTY_ARRAY = [];

export default Ember.ArrayProxy.extend({
export default ArrayProxy.extend({
/**
* The model that will be synchronized to the content of this proxy
* @property syncArray
Expand Down
10 changes: 7 additions & 3 deletions addon/classes/Column.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@ const {
isEmpty,
makeArray,
computed,
A: emberArray
A: emberArray,
Object: EmberObject
} = Ember;

/**
* @module Table
* @class Column
*/
export default class Column extends Ember.Object.extend({
export default class Column extends EmberObject.extend({
/**
* Whether the column can be hidden.
*
Expand Down Expand Up @@ -325,11 +326,14 @@ export default class Column extends Ember.Object.extend({
* @param {Object} options
*/
constructor(options = {}) {
// TODO: Revert this, when babel#5862 is resolved.
// https://github.com/babel/babel/issues/5862
super();

if (options instanceof Column) {
return options;
}

super();
this.setProperties(options);

let { subColumns } = options;
Expand Down
13 changes: 10 additions & 3 deletions addon/classes/Row.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
import Ember from 'ember';

const { computed, guidFor } = Ember;
const {
computed,
guidFor,
ObjectProxy
} = Ember;

/**
* @module Table
* @extends Ember.ObjectProxy
* @class Row
*/
export default class Row extends Ember.ObjectProxy.extend({
export default class Row extends ObjectProxy.extend({
/**
* Whether the row is hidden.
*
Expand Down Expand Up @@ -84,11 +88,14 @@ export default class Row extends Ember.ObjectProxy.extend({
* @param {Object} options
*/
constructor(content, options = {}) {
// TODO: Revert this, when babel#5862 is resolved.
// https://github.com/babel/babel/issues/5862
super();

if (content instanceof Row) {
return content;
}

super();
this.setProperties(options);
this.set('content', content);
}
Expand Down
5 changes: 3 additions & 2 deletions addon/classes/Table.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ const {
get,
computed,
isNone,
A: emberArray
A: emberArray,
Object: EmberObject
} = Ember;

const RowSyncArrayProxy = SyncArrayProxy.extend({
Expand All @@ -30,7 +31,7 @@ const RowSyncArrayProxy = SyncArrayProxy.extend({
* @module Table
* @class Table
*/
export default class Table extends Ember.Object.extend({
export default class Table extends EmberObject.extend({
/**
* @property columns
* @type {Ember.Array}
Expand Down
3 changes: 2 additions & 1 deletion addon/components/lt-column-resizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ import layout from '../templates/components/lt-column-resizer';

const {
$,
Component,
computed
} = Ember;

const TOP_LEVEL_CLASS = '.ember-light-table';

export default Ember.Component.extend({
export default Component.extend({
layout,
classNameBindings: [':lt-column-resizer', 'isResizing'],
column: null,
Expand Down
5 changes: 3 additions & 2 deletions addon/mixins/draggable-column.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ import Ember from 'ember';

const {
run,
computed
computed,
Mixin
} = Ember;

let sourceColumn;

export default Ember.Mixin.create({
export default Mixin.create({
classNameBindings: ['isDragging', 'isDragTarget', 'dragDirection'],
attributeBindings: ['isDraggable:draggable'],

Expand Down
15 changes: 13 additions & 2 deletions addon/mixins/table-header.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import Ember from 'ember';

const {
computed
computed,
Mixin
} = Ember;

/**
Expand All @@ -14,7 +15,7 @@ const {
* @private
*/

export default Ember.Mixin.create({
export default Mixin.create({
/**
* @property table
* @type {Table}
Expand Down Expand Up @@ -66,13 +67,23 @@ export default Ember.Mixin.create({
resizeOnDrag: false,

/**
* CSS classes to be applied to an `<i class="lt-sort-icon></i>` tag that is
* inserted into the column's `<th>` element.
*
* For instance, if you have installed `ember-font-awesome` or include the
* `font-awesome` assets manually (e.g. via a CDN), you can set
* `iconAscending` to `'fa fa-sort-asc'`, which would yield this markup:
* `<i class="lt-sort-icon fa fa-sort-asc"></i>`
*
* @property iconAscending
* @type {String}
* @default ''
*/
iconAscending: '',

/**
* See `iconAscending`.
*
* @property iconDescending
* @type {String}
* @default ''
Expand Down
6 changes: 0 additions & 6 deletions blueprints/.jshintrc

This file was deleted.

19 changes: 0 additions & 19 deletions bower.json

This file was deleted.

Loading