Skip to content

Commit

Permalink
Merge pull request #119 from k-fish/update_embercli_3
Browse files Browse the repository at this point in the history
Update ember-cli
  • Loading branch information
k-fish authored Mar 20, 2018
2 parents 7951d8d + 598741c commit 249281e
Show file tree
Hide file tree
Showing 26 changed files with 6,333 additions and 176 deletions.
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
}
}
]
};
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,11 @@
/connect.lock
/coverage/*
/libpeerconnection.log
npm-debug.log
npm-debug.log*
yarn-error.log
testem.log

# ember-try
.node_modules.ember-try/
bower.json.ember-try
package.json.ember-try
12 changes: 10 additions & 2 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,17 @@ dist/
.bowerrc
.editorconfig
.ember-cli
.eslintrc.js
.gitignore
.watchmanconfig
.travis.yml
.npmignore
**/.gitkeep
bower.json
Brocfile.js
testem.json
ember-cli-build.js
testem.js

# ember-try
.node_modules.ember-try/
bower.json.ember-try
package.json.ember-try
42 changes: 25 additions & 17 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,43 @@
---
language: node_js
node_js:
- "6.10"
- "7"

sudo: false
sudo: required # fix for chrome sandbox missing error

addons:
chrome: stable

cache:
directories:
- node_modules
yarn: true

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

before_install:
- export PATH=/usr/local/phantomjs-2.0.0/bin:$PATH
- "npm config set spin false"
- "npm install -g npm@^2"
- curl -o- -L https://yarnpkg.com/install.sh | bash
- export PATH=$HOME/.yarn/bin:$PATH

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

script:
- ember try $EMBER_TRY_SCENARIO test
# 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
3 changes: 1 addition & 2 deletions addon/media.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import Ember from 'ember';
import nullMatchMedia from './null-match-media';

const { getOwner } = Ember;
import { getOwner } from "@ember/application"
const { dasherize, classify } = Ember.String;

/**
Expand Down
8 changes: 0 additions & 8 deletions bower.json

This file was deleted.

113 changes: 70 additions & 43 deletions config/ember-try.js
Original file line number Diff line number Diff line change
@@ -1,44 +1,71 @@
module.exports = {
scenarios: [
{
name: 'default',
dependencies: { }
},
{
name: 'ember-release',
dependencies: {
'ember': 'components/ember#release'
},
resolutions: {
'ember': 'release'
}
},
{
name: 'ember-beta',
dependencies: {
'ember': 'components/ember#beta'
},
resolutions: {
'ember': 'beta'
}
},
{
name: 'ember-canary',
dependencies: {
'ember': 'components/ember#canary'
},
resolutions: {
'ember': 'canary'
}
},
{
name: 'ember-1.13',
dependencies: {
'ember': 'components/ember#1.13.13'
},
resolutions: {
'ember': '1.13.13'
}
}
]
'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'
}
}
},
{
name: 'ember-lts-2.16',
npm: {
devDependencies: {
'ember-source': '~2.16.0'
}
}
},
{
name: 'ember-lts-2.18',
npm: {
devDependencies: {
'ember-source': '~2.18.0'
}
}
},
{
name: 'ember-release',
npm: {
devDependencies: {
'ember-source': urls[0]
}
}
},
{
name: 'ember-beta',
npm: {
devDependencies: {
'ember-source': urls[1]
}
}
},
{
name: 'ember-canary',
npm: {
devDependencies: {
'ember-source': urls[2]
}
}
},
{
name: 'ember-default',
npm: {
devDependencies: {}
}
}
]
};
});
};
8 changes: 4 additions & 4 deletions ember-cli-build.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
/* 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 All @@ -12,7 +13,6 @@ module.exports = function(defaults) {
This build file does *not* influence how the addon or the app using it
behave. You most likely want to be modifying `./index.js` or app's build file
*/
app.import('bower_components/sinon/index.js', { type: 'test' });

return app.toTree();
};
1 change: 0 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* jshint node: true */
'use strict';

module.exports = {
Expand Down
56 changes: 34 additions & 22 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,45 +1,57 @@
{
"name": "ember-responsive",
"version": "2.0.5",
"version": "2.0.6",
"description": "An ember-cli addon that gives you a simple, Ember-aware way of dealing with media queries.",
"directories": {
"doc": "doc",
"test": "tests"
},
"scripts": {
"build": "ember build",
"start": "ember server",
"test": "ember try:testall"
},
"repository": "https://github.com/freshbooks/ember-responsive",
"engines": {
"node": ">= 0.10.0"
"node": "^4.5 || 6.* || >= 7.*"
},
"author": "FreshBooks",
"license": "MIT",
"scripts": {
"build": "ember build",
"lint:js": "eslint ./*.js addon addon-test-support app config lib server test-support tests",
"start": "ember serve",
"test": "ember try:each"
},
"dependencies": {
"ember-cli-babel": "^6.6.0"
},
"devDependencies": {
"broccoli-asset-rev": "^2.2.0",
"ember-cli": "2.13.2",
"broccoli-asset-rev": "^2.4.5",
"ember-ajax": "^3.0.0",
"ember-cli": "~3.0.1",
"ember-cli-dependency-checker": "^2.0.0",
"ember-cli-htmlbars": "^2.0.1",
"ember-cli-htmlbars-inline-precompile": "^0.4.3",
"ember-cli-inject-live-reload": "^1.3.1",
"ember-cli-qunit": "^4.0.0",
"ember-cli-shims": "1.1.0",
"ember-cli-test-loader": "2.1.0",
"ember-cli-uglify": "^1.2.0",
"ember-resolver": "^4.1.0",
"loader.js": "4.4.0"
"ember-cli-htmlbars-inline-precompile": "^1.0.0",
"ember-cli-inject-live-reload": "^1.4.1",
"ember-cli-qunit": "^4.1.1",
"ember-cli-shims": "^1.2.0",
"ember-cli-sri": "^2.1.0",
"ember-cli-uglify": "^2.0.0",
"ember-disable-prototype-extensions": "^1.1.2",
"ember-export-application-global": "^2.0.0",
"ember-load-initializers": "^1.0.0",
"ember-maybe-import-regenerator": "^0.1.6",
"ember-resolver": "^4.0.0",
"ember-sinon": "^1.0.0",
"ember-source": "https://s3.amazonaws.com/builds.emberjs.com/release/shas/95355c4c56c0d09bde61d9744e856fd9359e833f.tgz",
"ember-source-channel-url": "^1.0.1",
"ember-try": "^0.2.23",
"eslint-plugin-ember": "^5.0.0",
"eslint-plugin-node": "^5.2.1",
"loader.js": "^4.4.0"
},
"keywords": [
"ember-addon",
"media query"
],
"dependencies": {
"ember-cli-babel": "^6.4.1",
"ember-getowner-polyfill": "^1.1.1"
},
"ember-addon": {
"configPath": "tests/dummy/config",
"demoURL": "https://freshbooks.github.io/ember-responsive/"
}
}
}
Loading

0 comments on commit 249281e

Please sign in to comment.