Skip to content

Commit

Permalink
Merge pull request #2 from mike-north/master
Browse files Browse the repository at this point in the history
sync with source repo
  • Loading branch information
lmcardle authored Apr 20, 2018
2 parents 28a0f28 + ad18229 commit 05ee599
Show file tree
Hide file tree
Showing 41 changed files with 13,452 additions and 329 deletions.
14 changes: 0 additions & 14 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,8 @@ insert_final_newline = true
indent_style = space
indent_size = 2

[*.js]
indent_style = space
indent_size = 2

[*.hbs]
insert_final_newline = false
indent_style = space
indent_size = 2

[*.css]
indent_style = space
indent_size = 2

[*.html]
indent_style = space
indent_size = 2

[*.{diff,md}]
trim_trailing_whitespace = false
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/tests/dummy/public/js/materialize.js
56 changes: 56 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
module.exports = {
root: true,
parserOptions: {
ecmaVersion: 2017,
sourceType: 'module'
},
plugins: [
'ember'
],
extends: [
'eslint:recommended',
'plugin:ember/recommended'
],
env: {
browser: true
},
rules: {
},
overrides: [
// node files
{
files: [
'index.js',
'testem.js',
'ember-cli-build.js',
'config/**/*.js',
'tests/dummy/config/**/*.js'
],
excludedFiles: [
'app/**',
'addon/**'
],
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
})
},

// test files
{
files: ['tests/**/*.js'],
excludedFiles: ['tests/dummy/**/*.js'],
env: {
embertest: true
}
}
]
};
11 changes: 8 additions & 3 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,6 +13,11 @@
/connect.lock
/coverage/*
/libpeerconnection.log
npm-debug.log
npm-debug.log*
yarn-error.log
testem.log
*.sublime-workspace

# 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
.eslintrc.js
.gitignore
.jshintrc
.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
9 changes: 9 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"singleQuote": true,
"bracketSpacing": true,
"trailingComma": "none",
"useTabs": false,
"tabWidth": 2,
"printWidth": 120,
"semi": true
}
58 changes: 31 additions & 27 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,31 @@
---
language: node_js
node_js:
- 0.12.2
- "4"

sudo: false
dist: trusty

addons:
chrome: stable

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

env:
global:
# See https://git.io/vdao3 for details.
- JOBS=1
matrix:
- EMBER_TRY_SCENARIO=ember-1.10
- EMBER_TRY_SCENARIO=ember-1.11
- EMBER_TRY_SCENARIO=ember-1.12
- EMBER_TRY_SCENARIO=ember-1.13
- EMBER_TRY_SCENARIO=ember-2.0
- EMBER_TRY_SCENARIO=ember-2.1
- EMBER_TRY_SCENARIO=ember-2.2
- EMBER_TRY_SCENARIO=ember-2.3
- EMBER_TRY_SCENARIO=ember-release
- ALLOW_DEPRECATIONS=true EMBER_TRY_SCENARIO=ember-beta
- ALLOW_DEPRECATIONS=true EMBER_TRY_SCENARIO=ember-canary
# 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
global:
secure: mlHPZlkzVu5JpCzFNz+o/+DGyI6K2VLh5fY2zoAjuClRazPJ/04tKo8Fxol5U32jpeI6LXJlsyu+lO914q2L0M6+i7iTU1XFeL9PbSdK8IK1AdHWFiJAlli+7eDpkan3FnSg9Y3yjmYrKcaVimVMDmk0GlSiUBOlyic/gEj5uPguC1ACwzFVkwgOrxzUITLg6qtwgYGyJUY8QJb3baoFtZZrpSFqHvzPl2Wr7AIXAcVldl7S5fQUEsQ8gKEa8ZCbCMWvebNXDf8v7C/OwjJnh9awZDcNE5pPavV3mvftDY9QQEulxhhoXowJR/X+1lMcMzgkNtEcDceoRSTHG4z98ASQjsx6aywsZiGaqZlfCvpgkmruXTjCaVPR5lGd1imP+arrxlN6Kn6m+kKdf9KnmV7UIt+Q4lbDsWkNQXNuLC8Ag6okJSPXI3CghxRC8L/NR7iiapjs4SrImTUu9+eJMal93FTWqjQdTkZYWYD5ncKvOzFOX7w+PkmVAH/R8nnuQ+MZwhqi3TO7ieWGcC59mS7BeNokElXSpGUiR+4YahZMNYM27XV8RHXpik8DBvrlHQGtCpNtmZwmNSKR66Y/QgKdL1FJ7XEc+LqeRqkXXe9mEbcfMY7YzWDK1dc4+lFwRq24yxVX0/d40fe4T5CZ5K6RkHODpyHY15CYorEXT0c=

Expand All @@ -27,23 +35,19 @@ matrix:
- env: ALLOW_DEPRECATIONS=true EMBER_TRY_SCENARIO=ember-canary

before_install:
- mkdir travis-phantomjs
- wget https://s3.amazonaws.com/travis-phantomjs/phantomjs-2.0.0-ubuntu-12.04.tar.bz2
-O $PWD/travis-phantomjs/phantomjs-2.0.0-ubuntu-12.04.tar.bz2
- tar -xvf $PWD/travis-phantomjs/phantomjs-2.0.0-ubuntu-12.04.tar.bz2 -C $PWD/travis-phantomjs
- export PATH=$PWD/travis-phantomjs:$PATH
- npm config set spin false
- npm install -g npm@^2
install:
- npm install -g bower
- npm install
- bower install
# before_script:
# - ember sauce:connect
- npm config set spin false
- npm install -g npm@4
- npm --version

script:
- ember try $EMBER_TRY_SCENARIO test --skip-cleanup
- 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 --skip-cleanup

# after_script:
# - ember sauce:disconnect

deploy:
provider: npm
email: [email protected]
Expand Down
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"javascript.implicitProjectConfig.checkJs": true
}
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Ember-resize

[![Greenkeeper badge](https://badges.greenkeeper.io/mike-north/ember-resize.svg)](https://greenkeeper.io/)

<img align="right" src="http://i59.tinypic.com/fadijn.png">

[![Build Status](https://travis-ci.org/mike-north/ember-resize.svg?branch=master)](https://travis-ci.org/mike-north/ember-resize)
Expand Down
4 changes: 1 addition & 3 deletions addon/mixins/resize-aware.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import Ember from 'ember';

const { Mixin } = Ember;
import Mixin from '@ember/object/mixin';
const { floor } = Math;

export default Mixin.create({
Expand Down
15 changes: 9 additions & 6 deletions addon/services/resize.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import Ember from 'ember';
import { keys as emberKeys } from '@ember/polyfills';
import Service from '@ember/service';
import Evented from '@ember/object/evented';
import { classify } from '@ember/string';
import { oneWay } from '@ember/object/computed';
import { debounce } from '@ember/runloop';
import EmberObject, { set, getWithDefault } from '@ember/object';

// jscs:disable disallowDirectPropertyAccess
const Base = Ember.Service || Ember.Object;
const keys = Object.keys || Ember.keys;
// jscs:enable disallowDirectPropertyAccess

const { Evented, String: { classify }, computed: { oneWay }, run: { debounce }, getWithDefault, set } = Ember;
const Base = Service || EmberObject;
const keys = Object.keys || emberKeys;

export default Base.extend(Evented, {
_oldWidth: null,
Expand Down
4 changes: 0 additions & 4 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
{
"name": "ember-resize",
"dependencies": {
"ember": "~2.5.0",
"ember-cli-shims": "0.1.1",
"ember-cli-test-loader": "0.2.2",
"ember-qunit-notifications": "0.1.0"
}
}
66 changes: 34 additions & 32 deletions config/ember-try.js
Original file line number Diff line number Diff line change
@@ -1,40 +1,21 @@
/*jshint node:true*/
function scenario(emberVersion, addLegacyViews) {
var s = {
name: 'ember-' + emberVersion,
bower: {
dependencies: {
'ember': '~' + emberVersion + '.0'
},
resolutions: {
'ember': '~' + emberVersion + '.0'
}
}
};
s.npm = {
dependencies: {
'ember-legacy-views': '^0.2.0'
}
};
return s;
}

module.exports = {
scenarios: [
{
name: 'default',
bower: {
dependencies: { }
name: 'ember-lts-2.12',
npm: {
devDependencies: {
'ember-source': '~2.12.0'
}
}
},
{
name: 'ember-lts-2.16',
npm: {
devDependencies: {
'ember-source': '~2.16.0'
}
}
},
scenario('1.10'),
scenario('1.11'),
scenario('1.12'),
scenario('1.13'),
scenario('2.0'),
scenario('2.1'),
scenario('2.2'),
scenario('2.3'),
{
name: 'ember-release',
bower: {
Expand All @@ -44,6 +25,11 @@ module.exports = {
resolutions: {
'ember': 'release'
}
},
npm: {
devDependencies: {
'ember-source': null
}
}
},
{
Expand All @@ -55,6 +41,11 @@ module.exports = {
resolutions: {
'ember': 'beta'
}
},
npm: {
devDependencies: {
'ember-source': null
}
}
},
{
Expand All @@ -66,6 +57,17 @@ module.exports = {
resolutions: {
'ember': 'canary'
}
},
npm: {
devDependencies: {
'ember-source': null
}
}
},
{
name: 'ember-default',
npm: {
devDependencies: {}
}
}
]
Expand Down
8 changes: 4 additions & 4 deletions ember-cli-build.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/*jshint node:true*/
/* global require, module */
var EmberAddon = require('ember-cli/lib/broccoli/ember-addon');
'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
Loading

0 comments on commit 05ee599

Please sign in to comment.