Skip to content
This repository was archived by the owner on Oct 18, 2019. It is now read-only.

Commit eed11b4

Browse files
authored
Merge pull request #42 from lucacorti/master
FastBoot 1.0 compatibility
2 parents 3667c5b + 518e548 commit eed11b4

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

index.js

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ var util = require('util');
66
var extend = util._extend;
77
var Funnel = require('broccoli-funnel');
88
var mergeTrees = require('broccoli-merge-trees');
9+
var map = require('broccoli-stew').map;
910

1011
var defaultOptions = {
1112
importTooltipsterDefaultStyles: true,
@@ -16,10 +17,6 @@ var defaultOptions = {
1617
importTooltipsterShadow: false
1718
};
1819

19-
function isFastBoot() {
20-
return process.env.EMBER_CLI_FASTBOOT === 'true';
21-
}
22-
2320
module.exports = {
2421
name: 'ember-cli-tooltipster',
2522

@@ -34,9 +31,7 @@ module.exports = {
3431
this.app = app;
3532
this.tooltipsterOptions = extend(defaultOptions, app.options['ember-cli-tooltipster']);
3633

37-
if (!isFastBoot()) {
38-
this.importDependencies(app);
39-
}
34+
this.importDependencies(app);
4035

4136
return app;
4237
},
@@ -75,10 +70,14 @@ module.exports = {
7570
trees.push(vendorTree);
7671
}
7772

78-
trees.push(new Funnel(tooltipsterPath, {
73+
let tooltipsterTree = new Funnel(tooltipsterPath, {
7974
destDir: 'tooltipster',
8075
files: ['tooltipster.bundle.js']
81-
}));
76+
});
77+
78+
tooltipsterTree = map(tooltipsterTree, (content) => `if (typeof FastBoot === 'undefined') { ${content} }`);
79+
80+
trees.push(tooltipsterTree);
8281

8382
if (this.tooltipsterOptions.importTooltipsterDefaultStyles) {
8483
trees.push(new Funnel(tooltipsterCssPath, {

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@
5959
"dependencies": {
6060
"broccoli-funnel": "^1.2.0",
6161
"broccoli-merge-trees": "^2.0.0",
62-
"ember-cli-babel": "^6.0.0",
62+
"broccoli-stew": "^1.5.0",
63+
"ember-cli-babel": "^6.3.0",
6364
"ember-string-ishtmlsafe-polyfill": "^1.1.0",
6465
"tooltipster": "^4.2.5"
6566
},

0 commit comments

Comments
 (0)