Skip to content

Commit 3a408bf

Browse files
snewcomercibernox
authored andcommitted
update head to 0.4.1 (ronco#71)
* update ember-cli-head to 0.4.1
1 parent 7de2ffb commit 3a408bf

File tree

4 files changed

+41
-30
lines changed

4 files changed

+41
-30
lines changed

README.md

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ correctly.
1313
This add-on is perfect for combining with a prerendering
1414
server side solution such as [prerender.io](http://www.prerender.io)
1515
or with
16-
[Ember Fastboot](https://github.com/tildeio/ember-cli-fastboot) (Fastboot compatibility requires ember-cli-meta-tags v2+ and Ember 2.7+ (currently beta)).
16+
[Ember FastBoot](https://github.com/tildeio/ember-cli-fastboot) (FastBoot compatibility requires ember-cli-meta-tags v2+ and Ember 2.7+ (currently beta)).
1717

1818
## Usage
1919

@@ -24,15 +24,19 @@ In your Ember CLI project directory run:
2424
ember install ember-cli-meta-tags
2525
```
2626

27-
### Using with Ember Fastboot
27+
### Upgrading to 5.x
2828

29-
Version 4.0+ of this addon is designed to work with Fastboot >= 1.0.0-rc1. If you use
29+
Version 5.0 of this addon depends on [ember-cli-head](https://github.com/ronco/ember-cli-head) 0.4.0, which adds the requirement that the `{{head-layout}}` is added once in an application-wide template (usually `app/templates/application.hbs`). For more info, see the [ember-cli-head 0.4 upgrade note](https://github.com/ronco/ember-cli-head#upgrade-to-04x).
30+
31+
### Using with Ember FastBoot
32+
33+
Version 4.0+ of this addon is designed to work with FastBoot >= 1.0.0-rc1. If you use
3034
an order version of fastboot stick with 3.X.
3135

3236
Version 2.0+ of this addon is built upon
3337
[ember-cli-head](https://github.com/ronco/ember-cli-head) and as a
34-
result is will work automatically out of the box with Ember Fastboot
35-
if you are running a version of ember >= 2.7.
38+
result it will work automatically out of the box with Ember FastBoot
39+
if you are running a version of Ember >= 2.7.
3640

3741
#### Using with other ember-cli-head addons
3842

@@ -94,9 +98,9 @@ the didTransition event.
9498
###### Example: static headTags property on the route
9599
```javascript
96100
// app/routes/some-page.js
97-
import Ember from 'ember';
101+
import Route from '@ember/routing/route';
98102

99-
export default Ember.Route.extend({
103+
export default Route.extend({
100104
headTags: [{
101105
type: 'meta',
102106
tagId: 'meta-og-name',
@@ -118,12 +122,14 @@ export default Ember.Route.extend({
118122

119123
###### Example: Setting the headTags property in afterModel
120124
```javascript
121-
export default Ember.Route.extend({
122-
afterModel: function(model) {
125+
import Route from '@ember/routing/route';
126+
127+
export default Route.extend({
128+
afterModel(model) {
123129
this.setHeadTags(model);
124130
},
125131

126-
setHeadTags: function(model) {
132+
setHeadTags(model) {
127133
let headTags = [{
128134
type: 'meta',
129135
tagId: 'meta-description-tag',
@@ -147,10 +153,10 @@ that returns the appropriate head tags.
147153

148154
```javascript
149155
// app/routes/some-page.js
150-
import Ember from 'ember';
156+
import Route from '@ember/routing/route';
151157

152-
export default Ember.Route.extend({
153-
headTags: function() {
158+
export default Route.extend({
159+
headTags() {
154160
// here we are pulling meta data from the model for this route
155161
let model = this.modelFor(this.routeName);
156162
return [{
@@ -190,10 +196,10 @@ all of the headTags in the current route hierarchy will be re-built.
190196

191197
```javascript
192198
// app/routes/some-page.js
193-
import Ember from 'ember';
199+
import Route from '@ember/routing/route';
194200

195-
export default Ember.Route.extend(RouteMetaMixin, {
196-
headTags: function() {
201+
export default Route.extend(RouteMetaMixin, {
202+
headTags() {
197203
let controller = this.controllerFor(this.routeName);
198204
// value of head tags updates with value of `era` on this
199205
// route's controller
@@ -210,9 +216,9 @@ export default Ember.Route.extend(RouteMetaMixin, {
210216

211217

212218
// app/controller/some-page.js
213-
import Ember from 'ember';
219+
import Controller from '@ember/controller';
214220

215-
export default Ember.Controller.extend({
221+
export default Controller.extend({
216222
headTagsService: Ember.inject.service('head-tags'),
217223
queryParameters: {
218224
era: 'e'
@@ -240,17 +246,16 @@ Instructions for developing on this add-on.
240246

241247
* `git clone` this repository
242248
* `npm install`
243-
* `bower install`
244249

245250
### Running
246251

247-
* `ember server`
252+
* `ember serve`
248253
* Visit your app at http://localhost:4200.
249254

250255
### Running Tests
251256

252257
* `ember test`
253-
* `ember test --server`
258+
* `ember test --serve`
254259

255260
### Building
256261

package.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
},
2727
"dependencies": {
2828
"ember-cli-babel": "^6.6.0",
29-
"ember-cli-head": "^0.3.0",
29+
"ember-cli-head": "^0.4.1",
3030
"ember-cli-htmlbars": "^2.0.1"
3131
},
3232
"devDependencies": {
@@ -57,6 +57,10 @@
5757
"node": "^4.5 || 6.* || >= 7.*"
5858
},
5959
"ember-addon": {
60-
"configPath": "tests/dummy/config"
60+
"configPath": "tests/dummy/config",
61+
"after": "ember-cli-head",
62+
"versionCompatibility": {
63+
"ember": ">2.10.0"
64+
}
6165
}
6266
}

tests/dummy/app/templates/application.hbs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
{{head-layout}}
2+
13
<h2 id="title">Welcome to Ember.js</h2>
24

35
<ul>

yarn.lock

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1856,7 +1856,7 @@ electron-to-chromium@^1.3.47:
18561856
version "1.3.48"
18571857
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.48.tgz#d3b0d8593814044e092ece2108fc3ac9aea4b900"
18581858

1859-
ember-cli-babel@^6.0.0-beta.4, ember-cli-babel@^6.0.0-beta.7, ember-cli-babel@^6.1.0, ember-cli-babel@^6.11.0, ember-cli-babel@^6.12.0, ember-cli-babel@^6.3.0, ember-cli-babel@^6.6.0, ember-cli-babel@^6.8.1, ember-cli-babel@^6.8.2:
1859+
ember-cli-babel@^6.0.0-beta.4, ember-cli-babel@^6.0.0-beta.7, ember-cli-babel@^6.11.0, ember-cli-babel@^6.12.0, ember-cli-babel@^6.3.0, ember-cli-babel@^6.6.0, ember-cli-babel@^6.8.1, ember-cli-babel@^6.8.2:
18601860
version "6.14.1"
18611861
resolved "https://registry.yarnpkg.com/ember-cli-babel/-/ember-cli-babel-6.14.1.tgz#796339229035910b625593caffbc2683792ada68"
18621862
dependencies:
@@ -1907,12 +1907,12 @@ ember-cli-get-component-path-option@^1.0.0:
19071907
version "1.0.0"
19081908
resolved "https://registry.yarnpkg.com/ember-cli-get-component-path-option/-/ember-cli-get-component-path-option-1.0.0.tgz#0d7b595559e2f9050abed804f1d8eff1b08bc771"
19091909

1910-
ember-cli-head@^0.3.0:
1911-
version "0.3.1"
1912-
resolved "https://registry.yarnpkg.com/ember-cli-head/-/ember-cli-head-0.3.1.tgz#a407df4880f235280371c437bb5b0b5cbdaea646"
1910+
ember-cli-head@^0.4.0:
1911+
version "0.4.1"
1912+
resolved "https://registry.yarnpkg.com/ember-cli-head/-/ember-cli-head-0.4.1.tgz#28b7ee86439746640834b232a3b34ab1329f3cf3"
19131913
dependencies:
1914-
ember-cli-babel "^6.1.0"
1915-
ember-cli-htmlbars "^2.0.1"
1914+
ember-cli-babel "^6.11.0"
1915+
ember-cli-htmlbars "^2.0.3"
19161916

19171917
ember-cli-htmlbars-inline-precompile@^1.0.0:
19181918
version "1.0.3"
@@ -1924,7 +1924,7 @@ ember-cli-htmlbars-inline-precompile@^1.0.0:
19241924
heimdalljs-logger "^0.1.9"
19251925
silent-error "^1.1.0"
19261926

1927-
ember-cli-htmlbars@^2.0.1:
1927+
ember-cli-htmlbars@^2.0.1, ember-cli-htmlbars@^2.0.3:
19281928
version "2.0.3"
19291929
resolved "https://registry.yarnpkg.com/ember-cli-htmlbars/-/ember-cli-htmlbars-2.0.3.tgz#e116e1500dba12f29c94b05b9ec90f52cb8bb042"
19301930
dependencies:

0 commit comments

Comments
 (0)