Skip to content

Commit c207417

Browse files
alexdilibertocrodriguez1a
authored andcommitted
fix(cli): update to latest cli (#84)
fix an issue introduced in 12c1c89. Previously, when deploying the dummy app (prod build) or serving the app locally with prod (e s -prod), you would get a run-time error in vendor.js. This fixes the bug.
1 parent 6e83009 commit c207417

File tree

12 files changed

+515
-421
lines changed

12 files changed

+515
-421
lines changed

.travis.yml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,18 @@ cache:
1515
yarn: true
1616

1717
env:
18-
# we recommend new addons test the current and previous LTS
19-
# as well as latest stable release (bonus points to beta/canary)
20-
- EMBER_TRY_SCENARIO=ember-lts-2.8
21-
- EMBER_TRY_SCENARIO=ember-lts-2.12
22-
- EMBER_TRY_SCENARIO=ember-release
23-
- EMBER_TRY_SCENARIO=ember-beta
24-
- EMBER_TRY_SCENARIO=ember-canary
25-
- EMBER_TRY_SCENARIO=ember-default
18+
global:
19+
# See https://git.io/vdao3 for details.
20+
- JOBS=1
21+
matrix:
22+
# we recommend new addons test the current and previous LTS
23+
# as well as latest stable release (bonus points to beta/canary)
24+
- EMBER_TRY_SCENARIO=ember-lts-2.8
25+
- EMBER_TRY_SCENARIO=ember-lts-2.12
26+
- EMBER_TRY_SCENARIO=ember-release
27+
- EMBER_TRY_SCENARIO=ember-beta
28+
- EMBER_TRY_SCENARIO=ember-canary
29+
- EMBER_TRY_SCENARIO=ember-default
2630

2731
matrix:
2832
fast_finish: true

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,13 @@ This will automatically install the `ember-cli-sass` NPM dependency and create a
2929
ember install ember-font-awesome
3030
```
3131

32-
## deploy
32+
## Deploy
3333

3434
Deploy the demo app:
3535

3636
```sh
3737
ember deploy production
38+
git push upstream gh-pages
3839
```
3940

4041

ember-cli-build.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ const EmberAddon = require('ember-cli/lib/broccoli/ember-addon');
66
module.exports = function(defaults) {
77
let app = new EmberAddon(defaults, {
88
// Add options here
9-
babel: {
10-
plugins: ['transform-decorators-legacy']
11-
}
129
});
1310

1411
/*

package.json

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -38,44 +38,43 @@
3838
"dependencies": {
3939
"babel-eslint": "^7.2.3",
4040
"broccoli-funnel": "^1.2.0",
41-
"ember-cli-babel": "^6.3.0",
41+
"ember-cli-babel": "^6.6.0",
4242
"ember-cli-htmlbars": "^2.0.1",
43-
"ember-decorators": "^1.2.1"
43+
"ember-decorators": "^1.3.0"
4444
},
4545
"devDependencies": {
4646
"@commitlint/cli": "^3.1.2",
4747
"@commitlint/config-angular": "3.1.1",
48-
"babel-plugin-transform-decorators-legacy": "^1.3.4",
4948
"broccoli-asset-rev": "^2.4.5",
5049
"bulma": "^0.5.0",
5150
"code-highlight-linenums": "^0.2.1",
5251
"commitizen": "^2.9.6",
5352
"cz-customizable": "^5.0.0",
5453
"ember-ajax": "^3.0.0",
55-
"ember-cli": "~2.14.2",
54+
"ember-cli": "~2.16.2",
5655
"ember-cli-app-version": "^3.1.0",
5756
"ember-cli-content-security-policy": "^0.6.0",
58-
"ember-cli-dependency-checker": "^1.3.0",
57+
"ember-cli-dependency-checker": "^2.0.0",
5958
"ember-cli-deploy": "^1.0.1",
60-
"ember-cli-deploy-build": "^1.1.0",
59+
"ember-cli-deploy-build": "^1.1.1",
6160
"ember-cli-deploy-git": "^1.3.0",
62-
"ember-cli-eslint": "^3.0.0",
63-
"ember-cli-htmlbars-inline-precompile": "^0.4.3",
61+
"ember-cli-eslint": "^4.0.0",
62+
"ember-cli-htmlbars-inline-precompile": "^1.0.0",
6463
"ember-cli-inject-live-reload": "^1.4.1",
65-
"ember-cli-qunit": "^4.0.0",
64+
"ember-cli-qunit": "^4.0.1",
6665
"ember-cli-sass": "^6.1.3",
6766
"ember-cli-shims": "^1.1.0",
6867
"ember-cli-sri": "^2.1.0",
69-
"ember-cli-uglify": "^1.2.0",
68+
"ember-cli-uglify": "^2.0.0",
7069
"ember-composable-helpers": "~2.0.0",
7170
"ember-disable-prototype-extensions": "^1.1.2",
7271
"ember-export-application-global": "^2.0.0",
7372
"ember-load-initializers": "^1.0.0",
7473
"ember-maybe-import-regenerator": "^0.1.6",
75-
"ember-native-dom-helpers": "^0.5.2",
74+
"ember-native-dom-helpers": "^0.5.4",
7675
"ember-resolver": "^4.0.0",
77-
"ember-source": "~2.14.1",
78-
"ember-themed-syntax": "^0.1.1",
76+
"ember-source": "~2.16.0",
77+
"ember-themed-syntax": "^0.1.2",
7978
"highlightjs": "^9.10.0",
8079
"hljs-themes": "^1.0.0",
8180
"husky": "^0.14.3",

tests/dummy/app/app.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import Ember from 'ember';
1+
import Application from '@ember/application';
22
import Resolver from './resolver';
33
import loadInitializers from 'ember-load-initializers';
44
import config from './config/environment';
55

6-
const App = Ember.Application.extend({
6+
const App = Application.extend({
77
modulePrefix: config.modulePrefix,
88
podModulePrefix: config.podModulePrefix,
99
Resolver

tests/dummy/app/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99

1010
{{content-for "head"}}
1111

12-
<link rel="stylesheet" href="{{rootURL}}assets/vendor.css">
13-
<link rel="stylesheet" href="{{rootURL}}assets/dummy.css">
12+
<link integrity="" rel="stylesheet" href="{{rootURL}}assets/vendor.css">
13+
<link integrity="" rel="stylesheet" href="{{rootURL}}assets/dummy.css">
1414
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
1515

1616
{{content-for "head-footer"}}

tests/dummy/app/router.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
1-
import Ember from 'ember';
1+
import EmberRouter from '@ember/routing/router';
22
import config from './config/environment';
33

4-
const {
5-
Router: EmberRouter
6-
} = Ember;
7-
84
const Router = EmberRouter.extend({
95
location: config.locationType,
106
rootURL: config.rootURL

tests/dummy/config/environment.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ module.exports = function(environment) {
5555
}
5656

5757
if (environment === 'production') {
58+
// here you can enable a production-specific feature
5859
ENV.rootURL = '/ember-bulma';
5960
ENV.locationType = 'hash';
6061
}

tests/helpers/destroy-app.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
import Ember from 'ember';
2-
3-
const {
4-
run
5-
} = Ember;
1+
import { run } from '@ember/runloop';
62

73
export default function destroyApp(application) {
84
run(application, 'destroy');

tests/helpers/module-for-acceptance.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
import { module } from 'qunit';
2-
import Ember from 'ember';
2+
import { resolve } from 'rsvp';
33
import startApp from '../helpers/start-app';
44
import destroyApp from '../helpers/destroy-app';
55

6-
const { RSVP: { resolve } } = Ember;
7-
86
export default function(name, options = {}) {
97
module(name, {
108
beforeEach() {

tests/helpers/start-app.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1-
import Ember from 'ember';
21
import Application from '../../app';
32
import config from '../../config/environment';
3+
import { merge } from '@ember/polyfills';
4+
import { run } from '@ember/runloop';
45

56
export default function startApp(attrs) {
6-
let attributes = Ember.merge({}, config.APP);
7-
attributes = Ember.merge(attributes, attrs); // use defaults, but you can override;
7+
let attributes = merge({}, config.APP);
8+
attributes = merge(attributes, attrs); // use defaults, but you can override;
89

9-
return Ember.run(() => {
10+
return run(() => {
1011
let application = Application.create(attributes);
1112
application.setupForTesting();
1213
application.injectTestHelpers();

0 commit comments

Comments
 (0)