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

Update ember-cli #28

Closed
wants to merge 1 commit into from
Closed
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
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
/coverage/*
/libpeerconnection.log
npm-debug.log*
yarn-error.log
testem.log

*.ember-try
# 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
.gitignore
.eslintrc.js
.gitignore
.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
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@ before_install:
- bower --version

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

script:
- yarn lint:js
- yarn test
- yarn run ember try:each

Expand Down
2 changes: 1 addition & 1 deletion config/environment.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-env node */
'use strict';

/* eslint-env node */

module.exports = function(/* environment, appConfig */) {
return { };
Expand Down
4 changes: 2 additions & 2 deletions ember-cli-build.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

/* eslint-env node */

'use strict';

const EmberAddon = require('ember-cli/lib/broccoli/ember-addon');

module.exports = function(defaults) {
Expand Down
26 changes: 13 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,36 +22,36 @@
"start": "ember server",
"test": "jest",
"test:ember": "ember test",
"lint": "eslint app addon blueprints config server test-support tests *.js"
"lint:js": "eslint ./*.js addon addon-test-support app config lib server test-support tests"
},
"devDependencies": {
"@glimmer/syntax": "^0.29.1",
"broccoli-asset-rev": "^2.4.5",
"ember-ajax": "^2.4.1",
"ember-cli": "~2.12.3",
"ember-ajax": "^3.0.0",
"ember-cli": "~2.18.2",
"ember-cli-babel": "^6.11.0",
"ember-cli-chai": "0.3.2",
"ember-cli-dependency-checker": "^1.3.0",
"ember-cli-eslint": "^3.0.0",
"ember-cli-htmlbars": "^1.1.1",
"ember-cli-eslint": "^4.2.3",
"ember-cli-htmlbars": "^2.0.1",
"ember-cli-htmlbars-inline-precompile": "^1.0.2",
"ember-cli-inject-live-reload": "^1.4.1",
"ember-cli-mocha": "^0.15.0",
"ember-cli-shims": "^1.0.2",
"ember-cli-shims": "^1.2.0",
"ember-cli-sri": "^2.1.0",
"ember-cli-uglify": "^1.2.0",
"ember-disable-prototype-extensions": "^1.1.0",
"ember-export-application-global": "^1.0.5",
"ember-load-initializers": "^0.6.0",
"ember-resolver": "^2.0.3",
"ember-source": "~2.12.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-resolver": "^4.0.0",
"ember-source": "~2.18.0",
"ember-welcome-page": "^2.0.2",
"eslint-config-simplabs": "0.2.2",
"jest": "^21.2.0",
"loader.js": "^4.2.3"
},
"engines": {
"node": ">= 4"
"node": "^4.5 || 6.* || >= 7.*"
},
"ember-addon": {
"configPath": "tests/dummy/config",
Expand Down
14 changes: 7 additions & 7 deletions testem.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/* eslint-env node */
module.exports = {
'test_page': 'tests/index.html?hidepassed',
'disable_watching': true,
'launch_in_ci': [
test_page: 'tests/index.html?hidepassed',
disable_watching: true,
launch_in_ci: [
'Chrome'
],
'launch_in_dev': [
launch_in_dev: [
'Chrome'
],
browser_args: {
Expand All @@ -17,9 +17,9 @@ module.exports = {

'--disable-gpu',
'--headless',
'--remote-debugging-port=9222',
'--remote-debugging-port=0',
'--window-size=1440,900'
].filter(Boolean),
},
].filter(Boolean)
}
}
};
7 changes: 1 addition & 6 deletions tests/dummy/app/app.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
import Application from '@ember/application';
import Ember from 'ember';
import Resolver from './resolver';
import loadInitializers from 'ember-load-initializers';
import config from './config/environment';

let App;

Ember.MODEL_FACTORY_INJECTIONS = true;

App = Application.extend({
const App = Application.extend({
modulePrefix: config.modulePrefix,
podModulePrefix: config.podModulePrefix,
Resolver
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
2 changes: 1 addition & 1 deletion tests/dummy/app/templates/application.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
{{welcome-page}}
{{!-- Feel free to remove this! --}}

{{outlet}}
{{outlet}}
7 changes: 4 additions & 3 deletions tests/dummy/config/environment.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

/* eslint-env node */

'use strict';

module.exports = function(environment) {
let ENV = {
modulePrefix: 'dummy',
Expand Down Expand Up @@ -42,10 +42,11 @@ module.exports = function(environment) {
ENV.APP.LOG_VIEW_LOOKUPS = false;

ENV.APP.rootElement = '#ember-testing';
ENV.APP.autoboot = false;
}

if (environment === 'production') {
// here be dragons
// here you can enable a production-specific feature
}

return ENV;
Expand Down
10 changes: 10 additions & 0 deletions tests/dummy/config/targets.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/* eslint-env node */

module.exports = {
browsers: [
'ie 9',
'last 1 Chrome versions',
'last 1 Firefox versions',
'last 1 Safari versions'
]
};
4 changes: 2 additions & 2 deletions tests/helpers/module-for-acceptance.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Promise } from 'rsvp';
import { module } from 'qunit';
import { resolve } from 'rsvp';
import startApp from '../helpers/start-app';
import destroyApp from '../helpers/destroy-app';

Expand All @@ -15,7 +15,7 @@ export default function(name, options = {}) {

afterEach() {
let afterEach = options.afterEach && options.afterEach.apply(this, arguments);
return Promise.resolve(afterEach).then(() => destroyApp(this.application));
return resolve(afterEach).then(() => destroyApp(this.application));
}
});
}
5 changes: 3 additions & 2 deletions tests/helpers/start-app.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { run } from '@ember/runloop';
import { merge } from '@ember/polyfills';
import Application from '../../app';
import config from '../../config/environment';
import { merge } from '@ember/polyfills';
import { run } from '@ember/runloop';

export default function startApp(attrs) {
let attributes = merge({}, config.APP);
attributes.autoboot = true;
attributes = merge(attributes, attrs); // use defaults, but you can override;

return run(() => {
Expand Down
4 changes: 4 additions & 0 deletions tests/test-helper.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import resolver from './helpers/resolver';
import { setResolver } from 'ember-mocha';
import Application from '../app';
import config from '../config/environment';
import { setApplication } from '@ember/test-helpers';

setResolver(resolver);
setApplication(Application.create(config.APP));
Loading