-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
We now build the addon based on your Ember version, with builds prior to 1.13 maintaining the original initializer.
- Loading branch information
Lindsey Smith
committed
Jun 24, 2015
1 parent
7ef067b
commit 66a1b26
Showing
10 changed files
with
63 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
import Ember from 'ember'; | ||
var noop = Ember.K; | ||
|
||
export default function deactivateRouting(instance) { | ||
if (instance.startRouting) { | ||
instance.startRouting = noop; | ||
export default function deactivateRouting(instance_or_application) { | ||
if (instance_or_application.startRouting) { | ||
instance_or_application.startRouting = noop; | ||
} else if (instance_or_application.__deprecatedInstance__ && instance_or_application.__deprecatedInstance__.startRouting) { | ||
instance_or_application.__deprecatedInstance__.startRouting = noop; | ||
} else { | ||
Ember.assert("ember-islands doesn't know how to cancel routing for this" + | ||
"version of Ember. Please report this issue to https://github.com/mitchlloyd/ember-islands" + | ||
`with the version of Ember you are using (Ember.VERSION)`); | ||
"version of Ember. Please report this issue to https://github.com/mitchlloyd/ember-islands" + | ||
`with the version of Ember you are using (${Ember.VERSION})`); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import Ember from 'ember'; | ||
import deactivateRouting from 'ember-islands/deactivate-routing'; | ||
import renderComponents from 'ember-islands/render-components'; | ||
var get = Ember.get; | ||
|
||
export function initialize(registry, application) { | ||
if (get(application, 'EMBER_ISLANDS.bypass')) { | ||
return; | ||
} | ||
|
||
deactivateRouting(application); | ||
renderComponents(application); | ||
}; | ||
|
||
export default { | ||
name: 'boot-ember-islands', | ||
after: 'registerComponentLookup', | ||
initialize: initialize | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,18 @@ | ||
/* jshint node: true */ | ||
'use strict'; | ||
|
||
var path = require('path'); | ||
var VersionChecker = require('ember-cli-version-checker'); | ||
|
||
module.exports = { | ||
name: 'ember-islands' | ||
name: 'ember-islands', | ||
|
||
treeForApp: function (tree) { | ||
var checker = new VersionChecker(this); | ||
var dep = checker.for('ember', 'bower'); | ||
|
||
var version = dep.satisfies('<= 1.12') ? 'prefastboot' : 'fastboot'; | ||
|
||
return this.treeGenerator(path.join(this.root, 'app', version)); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters