Skip to content

Commit

Permalink
fix(shims): moving to the new style module api format using ember-cli…
Browse files Browse the repository at this point in the history
…-babel 6.6 rather then a beta version of the shims (#81)

Closes #79
  • Loading branch information
webark authored and knownasilya committed Jul 13, 2017
1 parent 18af17f commit da264a1
Show file tree
Hide file tree
Showing 12 changed files with 845 additions and 1,469 deletions.
14 changes: 10 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,25 @@
---
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:
yarn: true

env:
# we recommend testing LTS's and latest stable release (bonus points to beta/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.4
- EMBER_TRY_SCENARIO=ember-lts-2.8
- EMBER_TRY_SCENARIO=ember-lts-2.12
- EMBER_TRY_SCENARIO=ember-release
- EMBER_TRY_SCENARIO=ember-beta
- EMBER_TRY_SCENARIO=ember-canary
Expand All @@ -25,11 +33,9 @@ matrix:
before_install:
- curl -o- -L https://yarnpkg.com/install.sh | bash
- export PATH=$HOME/.yarn/bin:$PATH
- yarn global add phantomjs-prebuilt
- phantomjs --version

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

script:
# Usually, it's ok to finish the test scenario without reverting
Expand Down
4 changes: 2 additions & 2 deletions addon/components/x-toggle-label/component.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Component from 'ember-component';
import computed from 'ember-computed';
import Component from '@ember/component';
import { computed } from "@ember/object"
import layout from './template';

export default Component.extend({
Expand Down
4 changes: 2 additions & 2 deletions addon/components/x-toggle-switch/component.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Component from 'ember-component';
import computed from 'ember-computed';
import Component from '@ember/component';
import { computed } from "@ember/object"
import layout from './template';

export default Component.extend({
Expand Down
4 changes: 2 additions & 2 deletions addon/components/x-toggle/component.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Component from 'ember-component';
import computed from 'ember-computed';
import Component from '@ember/component';
import { computed } from "@ember/object"
import layout from './template';

export default Component.extend({
Expand Down
8 changes: 8 additions & 0 deletions config/ember-try.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ module.exports = {
}
}
},
{
name: 'ember-lts-2.12',
npm: {
devDependencies: {
'ember-source': '~2.12.0'
}
}
},
{
name: 'ember-release',
bower: {
Expand Down
17 changes: 8 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,33 +23,32 @@
"release": "standard-version"
},
"dependencies": {
"ember-cli-babel": "^6.0.0",
"ember-cli-babel": "^6.3.0",
"ember-cli-htmlbars": "^2.0.1",
"ember-runtime-enumerable-includes-polyfill": "^1.0.1"
"ember-runtime-enumerable-includes-polyfill": "^2.0.0"
},
"devDependencies": {
"broccoli-asset-rev": "^2.4.5",
"ember-cli": "~2.14.0-beta.2",
"ember-cli-dependency-checker": "^1.3.0",
"ember-cli-eslint": "^3.0.0",
"ember-cli": "~2.15.0-beta.1",
"ember-cli-dependency-checker": "^2.0.0",
"ember-cli-eslint": "^4.0.0",
"ember-cli-github-pages": "0.1.2",
"ember-cli-htmlbars-inline-precompile": "^0.4.3",
"ember-cli-inject-live-reload": "^1.4.1",
"ember-cli-qunit": "^4.0.0",
"ember-cli-release": "^1.0.0-beta.2",
"ember-cli-shims": "^1.1.0",
"ember-cli-sri": "^2.1.0",
"ember-cli-uglify": "^1.2.0",
"ember-disable-prototype-extensions": "^1.1.0",
"ember-disable-prototype-extensions": "^1.1.2",
"ember-export-application-global": "^2.0.0",
"ember-load-initializers": "^1.0.0",
"ember-resolver": "^4.0.0",
"ember-source": "~2.14.0-beta.1",
"ember-source": "~2.15.0-beta.1",
"loader.js": "^4.2.3",
"standard-version": "^4.0.0"
},
"engines": {
"node": ">= 4"
"node": "^4.5 || 6.* || >= 7.*"
},
"ember-addon": {
"configPath": "tests/dummy/config",
Expand Down
13 changes: 10 additions & 3 deletions testem.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,17 @@ module.exports = {
test_page: 'tests/index.html?hidepassed',
disable_watching: true,
launch_in_ci: [
'PhantomJS'
'Chrome'
],
launch_in_dev: [
'PhantomJS',
'Chrome'
]
],
browser_args: {
Chrome: [
'--disable-gpu',
'--headless',
'--remote-debugging-port=9222',
'--window-size=1440,900'
]
}
};
6 changes: 1 addition & 5 deletions tests/dummy/app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@ import Resolver from './resolver';
import loadInitializers from 'ember-load-initializers';
import config from './config/environment';

let App;

Ember.MODEL_FACTORY_INJECTIONS = true;

App = Ember.Application.extend({
const App = Ember.Application.extend({
modulePrefix: config.modulePrefix,
podModulePrefix: config.podModulePrefix,
Resolver
Expand Down
12 changes: 6 additions & 6 deletions tests/dummy/app/controllers/application.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import Ember from 'ember';
import computed from 'ember-computed';
const { Logger: { log } } = Ember;
import Controller from "@ember/controller"
import { computed } from "@ember/object"
import { debug } from "@ember/debug"

export default Ember.Controller.extend({
export default Controller.extend({
boundToggle: false,
bV2: 'ho',
notToggleLabelValue: computed.not('toggleLabelValue'),
Expand All @@ -18,9 +18,9 @@ export default Ember.Controller.extend({

clicked(target, hash) {
if (hash.code === 'toggled') {
log('toggled: ', hash);
debug('toggled: ', hash);
} else {
log('suggestion: ', hash);
debug('suggestion: ', hash);
}
this.set(target, hash.newValue);
},
Expand Down
4 changes: 2 additions & 2 deletions tests/dummy/app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

{{content-for "head"}}

<link rel="stylesheet" href="{{rootURL}}assets/vendor.css">
<link rel="stylesheet" href="{{rootURL}}assets/dummy.css">
<link integrity="" rel="stylesheet" href="{{rootURL}}assets/vendor.css">
<link integrity="" rel="stylesheet" href="{{rootURL}}assets/dummy.css">

{{content-for "head-footer"}}
</head>
Expand Down
7 changes: 0 additions & 7 deletions tests/dummy/config/environment.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,6 @@ module.exports = function(environment) {
APP: {
// Here you can pass flags/options to your application instance
// when it is created
},

'ember-toggle': {
//includedThemes: ['light', 'ios', 'flip'],
//excludedThemes: ['flip'],
//defaultTheme: 'light',
//defaultSize: 'small'
}
};

Expand Down

0 comments on commit da264a1

Please sign in to comment.