|
1 |
| -'use strict'; |
2 |
| - |
3 |
| -var commands = require('./lib/commands'); |
4 |
| -var getNetworkIp = require('./lib/utils/get-network-ip'); |
5 |
| -var cordovaPath = require('./lib/targets/cordova/utils/get-path'); |
6 |
| -var cordovaAssets = require('./lib/targets/cordova/utils/cordova-assets'); |
7 |
| - |
8 |
| -var mergeTrees = require('broccoli-merge-trees'); |
9 |
| -var Funnel = require('broccoli-funnel'); |
10 |
| - |
11 | 1 | module.exports = {
|
12 |
| - name: 'ember-cordova', |
13 |
| - |
14 |
| - contentFor: function(type) { |
15 |
| - if (this.project.targetIsCordova && type === 'body') { |
16 |
| - return '<script src="cordova.js"></script>'; |
17 |
| - } |
18 |
| - }, |
19 |
| - |
20 |
| - includedCommands: function() { |
21 |
| - return commands; |
22 |
| - }, |
23 |
| - |
24 |
| - _mergeTrees: function(trees) { |
25 |
| - return mergeTrees(trees); |
26 |
| - }, |
27 |
| - |
28 |
| - //In Livereload scenarios, we need to manually include cordova assets |
29 |
| - cordovaAssetTree: function(tree) { |
30 |
| - var platform = this.project.CORDOVA_PLATFORM; |
31 |
| - var projectPath = cordovaPath(this.project); |
32 |
| - var assets = cordovaAssets.getPaths(platform, projectPath); |
33 |
| - |
34 |
| - cordovaAssets.validatePaths(assets.assetsPath, projectPath); |
35 |
| - |
36 |
| - var pluginsTree = new Funnel('ember-cordova/cordova', { |
37 |
| - srcDir: assets.assetsPath, |
38 |
| - include: assets.files |
39 |
| - }); |
40 |
| - |
41 |
| - return this._mergeTrees([tree, pluginsTree]); |
42 |
| - }, |
43 |
| - |
44 |
| - treeForPublic: function() { |
45 |
| - var tree = this._super.treeForPublic.apply(this, arguments); |
46 |
| - |
47 |
| - if (this.project.targetIsCordovaLivereload) { |
48 |
| - return this.cordovaAssetTree(tree); |
49 |
| - } |
50 |
| - |
51 |
| - return tree; |
52 |
| - } |
| 2 | + name: 'corber' |
53 | 3 | };
|
0 commit comments