forked from ember-fastboot/ember-cli-fastboot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
39 lines (32 loc) · 1012 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/* jshint node: true */
'use strict';
module.exports = {
name: 'ember-cli-fastboot',
includedCommands: function() {
return {
fastboot: require('./lib/commands/fastboot'),
'fastboot:build': require('./lib/commands/fastboot-build')
};
},
contentFor: function(type, config) {
// do nothing unless running `ember fastboot` command
if (!process.env.EMBER_CLI_FASTBOOT) { return; }
if (type === 'body') {
return "<!-- EMBER_CLI_FASTBOOT_BODY -->";
}
if (type === 'head') {
return "<!-- EMBER_CLI_FASTBOOT_TITLE -->";
}
if (type === 'vendor-prefix') {
return '// Added from ember-cli-fastboot \n' +
'EmberENV.FEATURES = EmberENV.FEATURES || {};\n' +
'EmberENV.FEATURES["ember-application-visit"] = true;\n';
}
},
included: function() {
if (process.env.EMBER_CLI_FASTBOOT) {
this.app.options.storeConfigInMeta = false;
process.env.EMBER_CLI_FASTBOOT_APP_NAME = this.app.name;
}
}
};